Commit e556cd20 authored by Max Kellermann's avatar Max Kellermann

util/NumberParser: add `noexcept`

parent 80ec6f97
/* /*
* Copyright (C) 2009-2013 Max Kellermann <max.kellermann@gmail.com> * Copyright 2009-2019 Max Kellermann <max.kellermann@gmail.com>
* http://www.musicpd.org * http://www.musicpd.org
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include <stdlib.h> #include <stdlib.h>
static inline unsigned static inline unsigned
ParseUnsigned(const char *p, char **endptr=nullptr, int base=10) ParseUnsigned(const char *p, char **endptr=nullptr, int base=10) noexcept
{ {
assert(p != nullptr); assert(p != nullptr);
...@@ -44,7 +44,7 @@ ParseUnsigned(const char *p, char **endptr=nullptr, int base=10) ...@@ -44,7 +44,7 @@ ParseUnsigned(const char *p, char **endptr=nullptr, int base=10)
} }
static inline int static inline int
ParseInt(const char *p, char **endptr=nullptr, int base=10) ParseInt(const char *p, char **endptr=nullptr, int base=10) noexcept
{ {
assert(p != nullptr); assert(p != nullptr);
...@@ -52,7 +52,7 @@ ParseInt(const char *p, char **endptr=nullptr, int base=10) ...@@ -52,7 +52,7 @@ ParseInt(const char *p, char **endptr=nullptr, int base=10)
} }
static inline uint64_t static inline uint64_t
ParseUint64(const char *p, char **endptr=nullptr, int base=10) ParseUint64(const char *p, char **endptr=nullptr, int base=10) noexcept
{ {
assert(p != nullptr); assert(p != nullptr);
...@@ -60,7 +60,7 @@ ParseUint64(const char *p, char **endptr=nullptr, int base=10) ...@@ -60,7 +60,7 @@ ParseUint64(const char *p, char **endptr=nullptr, int base=10)
} }
static inline int64_t static inline int64_t
ParseInt64(const char *p, char **endptr=nullptr, int base=10) ParseInt64(const char *p, char **endptr=nullptr, int base=10) noexcept
{ {
assert(p != nullptr); assert(p != nullptr);
...@@ -68,7 +68,7 @@ ParseInt64(const char *p, char **endptr=nullptr, int base=10) ...@@ -68,7 +68,7 @@ ParseInt64(const char *p, char **endptr=nullptr, int base=10)
} }
static inline double static inline double
ParseDouble(const char *p, char **endptr=nullptr) ParseDouble(const char *p, char **endptr=nullptr) noexcept
{ {
assert(p != nullptr); assert(p != nullptr);
...@@ -76,7 +76,7 @@ ParseDouble(const char *p, char **endptr=nullptr) ...@@ -76,7 +76,7 @@ ParseDouble(const char *p, char **endptr=nullptr)
} }
static inline float static inline float
ParseFloat(const char *p, char **endptr=nullptr) ParseFloat(const char *p, char **endptr=nullptr) noexcept
{ {
#if defined(__BIONIC__) && __ANDROID_API__ < 21 #if defined(__BIONIC__) && __ANDROID_API__ < 21
/* strtof() requires API level 21 */ /* strtof() requires API level 21 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment