summaryrefslogtreecommitdiff
path: root/src/mongo/base/parse_number.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/base/parse_number.h')
-rw-r--r--src/mongo/base/parse_number.h46
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