diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2019-07-30 12:54:18 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@broadpark.no> | 2019-07-30 13:00:40 +0200 |
commit | fba625e9a06308364f0c0e6728a9d2195b9354a0 (patch) | |
tree | f26a1979f4c5733331c11832a0256234a4a8b38b /searchcore/src | |
parent | b53df1fcba1dae72a6e78c7892bc7b51408d4348 (diff) |
Use proper scope for enum constants.
Diffstat (limited to 'searchcore/src')
5 files changed, 13 insertions, 13 deletions
diff --git a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp index ce07858ea0b..f76743b9480 100644 --- a/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentdbconfigscout/documentdbconfigscout_test.cpp @@ -216,9 +216,9 @@ setupLiveAttributes(AttributesConfigBuilder::AttributeVector &attributes) attributes.push_back(setupFastSearchAttribute("a0")); attributes.push_back(setupFastSearchAndMoreAttribute("a1")); attributes.push_back(setupFastSearchAttribute("a2")); - attributes.back().datatype = AttributesConfig::Attribute::INT8; + attributes.back().datatype = AttributesConfig::Attribute::Datatype::INT8; attributes.push_back(setupFastSearchAttribute("a3")); - attributes.back().collectiontype = AttributesConfig::Attribute::ARRAY; + attributes.back().collectiontype = AttributesConfig::Attribute::Collectiontype::ARRAY; attributes.push_back(setupFastSearchAttribute("a4")); attributes.back().createifnonexistent = true; } diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp b/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp index b85e706397d..3047834be85 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp +++ b/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp @@ -271,7 +271,7 @@ CompressionConfig::Type convert(InternalFdispatchrcType::Packetcompresstype type) { switch (type) { - case InternalFdispatchrcType::LZ4: return CompressionConfig::LZ4; + case InternalFdispatchrcType::Packetcompresstype::LZ4: return CompressionConfig::LZ4; default: return CompressionConfig::LZ4; } } diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h index 32f85e904ae..e0b0f0d7403 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h @@ -69,9 +69,9 @@ public: class QueryDistributionMode { public: enum Mode { - RANDOM = PartitionsConfig::Dataset::RANDOM, - AUTOMATIC = PartitionsConfig::Dataset::AUTOMATIC, - FIXEDROW = PartitionsConfig::Dataset::FIXEDROW + RANDOM = static_cast<int>(PartitionsConfig::Dataset::Querydistribution::RANDOM), + AUTOMATIC = static_cast<int>(PartitionsConfig::Dataset::Querydistribution::AUTOMATIC), + FIXEDROW = static_cast<int>(PartitionsConfig::Dataset::Querydistribution::FIXEDROW) }; QueryDistributionMode(Mode mode, double minGroupCoverage, double latencyDecayRate) : diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp index 53f7f544980..a562408b64d 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp @@ -152,9 +152,9 @@ template<typename T> CompressionConfig deriveCompression(const T & config) { CompressionConfig compression; - if (config.type == T::LZ4) { + if (config.type == T::Type::LZ4) { compression.type = CompressionConfig::LZ4; - } else if (config.type == T::ZSTD) { + } else if (config.type == T::Type::ZSTD) { compression.type = CompressionConfig::ZSTD; } compression.compressionLevel = config.level; diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index 06f19eb06cc..5db499601f3 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -65,7 +65,7 @@ CompressionConfig::Type convert(InternalProtonType::Packetcompresstype type) { switch (type) { - case InternalProtonType::LZ4: return CompressionConfig::LZ4; + case InternalProtonType::Packetcompresstype::LZ4: return CompressionConfig::LZ4; default: return CompressionConfig::LZ4; } } @@ -74,10 +74,10 @@ void setBucketCheckSumType(const ProtonConfig & proton) { switch (proton.bucketdb.checksumtype) { - case InternalProtonType::Bucketdb::LEGACY: + case InternalProtonType::Bucketdb::Checksumtype::LEGACY: bucketdb::BucketState::setChecksumType(bucketdb::BucketState::ChecksumType::LEGACY); break; - case InternalProtonType::Bucketdb::XXHASH64: + case InternalProtonType::Bucketdb::Checksumtype::XXHASH64: bucketdb::BucketState::setChecksumType(bucketdb::BucketState::ChecksumType::XXHASH64); break; } @@ -273,7 +273,7 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) IFlushStrategy::SP strategy; const ProtonConfig::Flush & flush(protonConfig.flush); switch (flush.strategy) { - case ProtonConfig::Flush::MEMORY: { + case ProtonConfig::Flush::Strategy::MEMORY: { auto memoryFlush = std::make_shared<MemoryFlush>( MemoryFlushConfigUpdater::convertConfig(flush.memory, hwInfo.memory()), fastos::ClockSystem::now()); _memoryFlushConfigUpdater = std::make_unique<MemoryFlushConfigUpdater>(memoryFlush, flush.memory, hwInfo.memory()); @@ -281,7 +281,7 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) strategy = memoryFlush; break; } - case ProtonConfig::Flush::SIMPLE: + case ProtonConfig::Flush::Strategy::SIMPLE: default: strategy = std::make_shared<SimpleFlush>(); break; |