8000 fix,solaris: "version" conflicts with math namespace · doublerebel/arangodb@a85a055 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit a85a055

Browse files
committed
fix,solaris: "version" conflicts with math namespace
lib/Basics/RandomGenerator.cpp: In function 'arangodb::basics::Random::random_e arangodb::basics::Random::selectVersion(arangodb::basics::Random::random_e)': lib/Basics/RandomGenerator.cpp:544:25: error: reference to 'version' is ambiguous random_e oldVersion = version; ^ In file included from ./lib/Basics/Common.h:62:0, from lib/Basics/RandomGenerator.h:27, from lib/Basics/RandomGenerator.cpp:24: /opt/local/gcc49/lib/gcc/x86_64-sun-solaris2.11/4.9.3/include-fixed/math.h:119:6: note: candidates are: enum version enum version {libm_ieee = -1, c_issue_4, ansi_1, strict_ansi};
1 parent b68a430 commit a85a055

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/Basics/RandomGenerator.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace {
4545
/// @brief random version
4646
////////////////////////////////////////////////////////////////////////////////
4747

48-
Random::random_e version = Random::RAND_MERSENNE;
48+
Random::random_e random_version = Random::RAND_MERSENNE;
4949

5050
////////////////////////////////////////////////////////////////////////////////
5151
/// @brief random lock
@@ -541,10 +541,10 @@ std::string UniformCharacter::random(size_t length) {
541541
random_e selectVersion(random_e newVersion) {
542542
MUTEX_LOCKER(RandomLock);
543543

544-
random_e oldVersion = version;
545-
version = newVersion;
544+
random_e oldVersion = random_version;
545+
random_version = newVersion;
546546

547-
switch (version) {
547+
switch (random_version) {
548548
case RAND_MERSENNE: {
549549
uniformInteger.reset(new UniformIntegerMersenne);
550550
break;
@@ -605,11 +605,11 @@ random_e selectVersion(random_e newVersion) {
605605
return oldVersion;
606606
}
607607

608-
random_e currentVersion() { return version; }
608+
random_e currentVersion() { return random_version; }
609609

610610
void shutdown() {}
611611

612-
bool isBlocking() { return version == RAND_RANDOM; }
612+
bool isBlocking() { return random_version == RAND_RANDOM; }
613613

614614
int32_t interval(int32_t left, int32_t right) {
615615
MUTEX_LOCKER(RandomLock);

0 commit comments

Comments
 (0)
0