diff options
author | Henning Baldersheim <balder@oath.com> | 2018-09-12 12:12:05 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-09-12 12:13:04 +0200 |
commit | 08e2df4a22521f312ebace5a8f269fdeb27457e3 (patch) | |
tree | 4c036d3548ccb56eeebfde0b01847bdcf560ce60 /document/src | |
parent | 3ede5bdf02f79649100af76da5eeec30a8491acf (diff) |
Minor code cleanup while passing by.
Diffstat (limited to 'document/src')
4 files changed, 11 insertions, 13 deletions
diff --git a/document/src/vespa/document/datatype/structdatatype.cpp b/document/src/vespa/document/datatype/structdatatype.cpp index 3ccb08c32be..7c308202e3b 100644 --- a/document/src/vespa/document/datatype/structdatatype.cpp +++ b/document/src/vespa/document/datatype/structdatatype.cpp @@ -40,7 +40,7 @@ StructDataType::StructDataType(vespalib::stringref name, int32_t dataTypeId) _compressionConfig() { } -StructDataType::~StructDataType() { } +StructDataType::~StructDataType() = default; StructDataType* StructDataType::clone() const { diff --git a/document/src/vespa/document/datatype/structdatatype.h b/document/src/vespa/document/datatype/structdatatype.h index 4491ed68e01..42003d3b466 100644 --- a/document/src/vespa/document/datatype/structdatatype.h +++ b/document/src/vespa/document/datatype/structdatatype.h @@ -71,10 +71,10 @@ public: DECLARE_IDENTIFIABLE(StructDataType); private: - typedef vespalib::hash_map<vespalib::string, Field::SP> StringFieldMap; - typedef vespalib::hash_map<int32_t, Field::SP> IntFieldMap; - StringFieldMap _nameFieldMap; - IntFieldMap _idFieldMap; + using StringFieldMap = vespalib::hash_map<vespalib::string, Field::SP>; + using IntFieldMap = vespalib::hash_map<int32_t, Field::SP>; + StringFieldMap _nameFieldMap; + IntFieldMap _idFieldMap; CompressionConfig _compressionConfig; /** @return "" if not conflicting. Error message otherwise. */ diff --git a/document/src/vespa/document/repo/configbuilder.cpp b/document/src/vespa/document/repo/configbuilder.cpp index 45433c2a606..42b37104e04 100644 --- a/document/src/vespa/document/repo/configbuilder.cpp +++ b/document/src/vespa/document/repo/configbuilder.cpp @@ -2,8 +2,8 @@ #include "configbuilder.h" -namespace document { -namespace config_builder { +namespace document::config_builder { + int32_t createFieldId(const vespalib::string &name, int32_t type) { StructDataType dummy("dummy", type); Field f(name, dummy, true); @@ -63,5 +63,4 @@ DocumenttypesConfigBuilderHelper::document(int32_t id, const vespalib::string &n return DocTypeRep(_config.documenttype.back()); } -} // namespace config_builder -} // namespace document +} diff --git a/document/src/vespa/document/repo/configbuilder.h b/document/src/vespa/document/repo/configbuilder.h index 598c72f6358..c389fd3b09e 100644 --- a/document/src/vespa/document/repo/configbuilder.h +++ b/document/src/vespa/document/repo/configbuilder.h @@ -9,8 +9,7 @@ #include <vespa/vespalib/stllike/string.h> #include <cassert> -namespace document { -namespace config_builder { +namespace document::config_builder { class TypeOrId; @@ -143,6 +142,6 @@ public: ::document::DocumenttypesConfigBuilder &config() { return _config; } }; -} // namespace config_builder -} // namespace document + +} |