diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/base/parse_number.h | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/base/parse_number.h')
-rw-r--r-- | src/mongo/base/parse_number.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/mongo/base/parse_number.h b/src/mongo/base/parse_number.h index f9a5e44d1b8..44ee7af87e4 100644 --- a/src/mongo/base/parse_number.h +++ b/src/mongo/base/parse_number.h @@ -36,29 +36,29 @@ namespace mongo { - /** - * Parses a number out of a StringData. - * - * Parses "stringValue", interpreting it as a number of the given "base". On success, stores - * the parsed value into "*result" and returns Status::OK(). - * - * Valid values for "base" are 2-36, with 0 meaning "choose the base by inspecting the prefix - * on the number", as in strtol. Returns Status::BadValue if an illegal value is supplied for - * "base". - * - * The entirety of the std::string must consist of digits in the given base, except optionally the - * first character may be "+" or "-", and hexadecimal numbers may begin "0x". Same as strtol, - * without the property of stripping whitespace at the beginning, and fails to parse if there - * are non-digit characters at the end of the string. - * - * See parse_number.cpp for the available instantiations, and add any new instantiations there. - */ - template <typename NumberType> - Status parseNumberFromStringWithBase(StringData stringValue, int base, NumberType* result); +/** + * Parses a number out of a StringData. + * + * Parses "stringValue", interpreting it as a number of the given "base". On success, stores + * the parsed value into "*result" and returns Status::OK(). + * + * Valid values for "base" are 2-36, with 0 meaning "choose the base by inspecting the prefix + * on the number", as in strtol. Returns Status::BadValue if an illegal value is supplied for + * "base". + * + * The entirety of the std::string must consist of digits in the given base, except optionally the + * first character may be "+" or "-", and hexadecimal numbers may begin "0x". Same as strtol, + * without the property of stripping whitespace at the beginning, and fails to parse if there + * are non-digit characters at the end of the string. + * + * See parse_number.cpp for the available instantiations, and add any new instantiations there. + */ +template <typename NumberType> +Status parseNumberFromStringWithBase(StringData stringValue, int base, NumberType* result); - template <typename NumberType> - static Status parseNumberFromString(StringData stringValue, NumberType* result) { - return parseNumberFromStringWithBase(stringValue, 0, result); - } +template <typename NumberType> +static Status parseNumberFromString(StringData stringValue, NumberType* result) { + return parseNumberFromStringWithBase(stringValue, 0, result); +} } // namespace mongo |