diff options
author | Henning Baldersheim <balder@oath.com> | 2018-08-12 22:35:51 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2018-08-12 22:35:51 +0200 |
commit | 4466a390813c88051b86d47961cccd0b302efad8 (patch) | |
tree | 3487d457c92e1229ba526bd92e1228a3d5213d87 /config | |
parent | bd7421d6b4cbf27f6d67d37f68212541f2aefcf4 (diff) |
Remove whitespace
Diffstat (limited to 'config')
-rw-r--r-- | config/src/vespa/config/common/configkey.cpp | 4 | ||||
-rw-r--r-- | config/src/vespa/config/common/configkey.h | 6 | ||||
-rw-r--r-- | config/src/vespa/config/common/configparser.cpp | 10 | ||||
-rw-r--r-- | config/src/vespa/config/common/configparser.h | 36 |
4 files changed, 28 insertions, 28 deletions
diff --git a/config/src/vespa/config/common/configkey.cpp b/config/src/vespa/config/common/configkey.cpp index 722e552bff3..1b8460ea1f5 100644 --- a/config/src/vespa/config/common/configkey.cpp +++ b/config/src/vespa/config/common/configkey.cpp @@ -4,7 +4,7 @@ namespace config { -ConfigKey::ConfigKey(vespalib::stringref configId, +ConfigKey::ConfigKey(vespalib::stringref configId, vespalib::stringref defName, vespalib::stringref defNamespace, vespalib::stringref defMd5) @@ -16,7 +16,7 @@ ConfigKey::ConfigKey(vespalib::stringref configId, _key(_configId + _defName + _defNamespace) {} -ConfigKey::ConfigKey(vespalib::stringref configId, +ConfigKey::ConfigKey(vespalib::stringref configId, vespalib::stringref defName, vespalib::stringref defNamespace, vespalib::stringref defMd5, diff --git a/config/src/vespa/config/common/configkey.h b/config/src/vespa/config/common/configkey.h index f1f26799743..9f6eec99f63 100644 --- a/config/src/vespa/config/common/configkey.h +++ b/config/src/vespa/config/common/configkey.h @@ -8,12 +8,12 @@ namespace config { class ConfigKey { public: - ConfigKey(vespalib::stringref configId, + ConfigKey(vespalib::stringref configId, vespalib::stringref defName, vespalib::stringref defNamespace, vespalib::stringref defMd5); - ConfigKey(vespalib::stringref configId, + ConfigKey(vespalib::stringref configId, vespalib::stringref defName, vespalib::stringref defNamespace, vespalib::stringref defMd5, @@ -37,7 +37,7 @@ public: const std::vector<vespalib::string> & getDefSchema() const; template <typename ConfigType> - static const ConfigKey create(vespalib::stringref configId) + static const ConfigKey create(vespalib::stringref configId) { return ConfigKey(configId, ConfigType::CONFIG_DEF_NAME, ConfigType::CONFIG_DEF_NAMESPACE, diff --git a/config/src/vespa/config/common/configparser.cpp b/config/src/vespa/config/common/configparser.cpp index e892f2b4f21..e6105486c0c 100644 --- a/config/src/vespa/config/common/configparser.cpp +++ b/config/src/vespa/config/common/configparser.cpp @@ -8,7 +8,7 @@ namespace config { -void ConfigParser::throwNoDefaultValue(vespalib::stringref key) { +void ConfigParser::throwNoDefaultValue(vespalib::stringref key) { throw InvalidConfigException("Config parameter " + key + " has no " "default value and is not specified in config", VESPA_STRLOC); } @@ -85,7 +85,7 @@ ConfigParser::deQuote(const vespalib::string & source) namespace { bool -getValueForKey(vespalib::stringref key, vespalib::stringref line, +getValueForKey(vespalib::stringref key, vespalib::stringref line, vespalib::string& retval) { if (line.length() <= key.length()) { @@ -124,7 +124,7 @@ getValueForKey(vespalib::stringref key, vespalib::stringref line, } std::vector<vespalib::string> -ConfigParser::getLinesForKey(vespalib::stringref key, +ConfigParser::getLinesForKey(vespalib::stringref key, const vsvector & lines) { vsvector retval; @@ -141,7 +141,7 @@ ConfigParser::getLinesForKey(vespalib::stringref key, } void -ConfigParser::stripLinesForKey(vespalib::stringref key, +ConfigParser::stripLinesForKey(vespalib::stringref key, std::set<vespalib::string>& config) { vespalib::string value; @@ -228,7 +228,7 @@ ConfigParser::splitArray(const vsvector & config) } vespalib::string -ConfigParser::stripWhitespace(vespalib::stringref source) +ConfigParser::stripWhitespace(vespalib::stringref source) { // Remove leading spaces and return. if (source.empty()) { diff --git a/config/src/vespa/config/common/configparser.h b/config/src/vespa/config/common/configparser.h index 608fbcce560..c70aeed4901 100644 --- a/config/src/vespa/config/common/configparser.h +++ b/config/src/vespa/config/common/configparser.h @@ -24,7 +24,7 @@ private: static std::map<vespalib::string, vsvector> splitMap( const vsvector & config); static vespalib::string deQuote(const vespalib::string & source); - static void throwNoDefaultValue(vespalib::stringref key); + static void throwNoDefaultValue(vespalib::stringref key); template<typename T> static T convert(const vsvector &); @@ -32,43 +32,43 @@ private: static vespalib::string arrayToString(const vsvector &); template<typename T, typename V> - static T parseInternal(vespalib::stringref key, const V & config); + static T parseInternal(vespalib::stringref key, const V & config); template<typename T, typename V> - static T parseInternal(vespalib::stringref key, const V & config, T defaultValue); + static T parseInternal(vespalib::stringref key, const V & config, T defaultValue); template<typename T, typename V> - static std::vector<T> parseArrayInternal(vespalib::stringref key, const V & config); + static std::vector<T> parseArrayInternal(vespalib::stringref key, const V & config); template<typename T, typename V> - static std::map<vespalib::string, T> parseMapInternal(vespalib::stringref key, const V & config); + static std::map<vespalib::string, T> parseMapInternal(vespalib::stringref key, const V & config); template<typename T, typename V> - static T parseStructInternal(vespalib::stringref key, const V & config); + static T parseStructInternal(vespalib::stringref key, const V & config); public: - static void stripLinesForKey(vespalib::stringref key, + static void stripLinesForKey(vespalib::stringref key, std::set<vespalib::string>& config); - static vespalib::string stripWhitespace(vespalib::stringref source); + static vespalib::string stripWhitespace(vespalib::stringref source); template<typename T> - static T parse(vespalib::stringref key, const vsvector & config) { + static T parse(vespalib::stringref key, const vsvector & config) { return parseInternal<T, vsvector>(key, config); } template<typename T> - static T parse(vespalib::stringref key, const vsvector & config, T defaultValue) { + static T parse(vespalib::stringref key, const vsvector & config, T defaultValue) { return parseInternal(key, config, defaultValue); } template<typename T> - static std::vector<T> parseArray(vespalib::stringref key, const vsvector & config) { + static std::vector<T> parseArray(vespalib::stringref key, const vsvector & config) { return parseArrayInternal<T, vsvector>(key, config); } template<typename T> - static std::map<vespalib::string, T> parseMap(vespalib::stringref key, const vsvector & config) { + static std::map<vespalib::string, T> parseMap(vespalib::stringref key, const vsvector & config) { return parseMapInternal<T, vsvector>(key, config); } template<typename T> - static T parseStruct(vespalib::stringref key, const vsvector & config) { + static T parseStruct(vespalib::stringref key, const vsvector & config) { return parseStructInternal<T, vsvector>(key, config); } @@ -76,7 +76,7 @@ public: template<typename T, typename V> T -ConfigParser::parseInternal(vespalib::stringref key, const V & config) +ConfigParser::parseInternal(vespalib::stringref key, const V & config) { V lines = getLinesForKey(key, config); @@ -88,7 +88,7 @@ ConfigParser::parseInternal(vespalib::stringref key, const V & config) template<typename T, typename V> T -ConfigParser::parseInternal(vespalib::stringref key, const V & config, T defaultValue) +ConfigParser::parseInternal(vespalib::stringref key, const V & config, T defaultValue) { V lines = getLinesForKey(key, config); @@ -107,7 +107,7 @@ ConfigParser::convert(const vsvector & lines) { template<typename T, typename V> std::map<vespalib::string, T> -ConfigParser::parseMapInternal(vespalib::stringref key, const V & config) +ConfigParser::parseMapInternal(vespalib::stringref key, const V & config) { V lines = getLinesForKey(key, config); typedef std::map<vespalib::string, V> SplittedMap; @@ -121,7 +121,7 @@ ConfigParser::parseMapInternal(vespalib::stringref key, const V & config) template<typename T, typename V> std::vector<T> -ConfigParser::parseArrayInternal(vespalib::stringref key, const V & config) +ConfigParser::parseArrayInternal(vespalib::stringref key, const V & config) { V lines = getLinesForKey(key, config); std::vector<V> split = splitArray(lines); @@ -136,7 +136,7 @@ ConfigParser::parseArrayInternal(vespalib::stringref key, const V & config) template<typename T, typename V> T -ConfigParser::parseStructInternal(vespalib::stringref key, const V & config) +ConfigParser::parseStructInternal(vespalib::stringref key, const V & config) { V lines = getLinesForKey(key, config); |