From e556cd20f7ec13ca9802fe7d74a6a29312dd8d10 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 6 Jun 2019 13:15:00 +0200 Subject: [PATCH] util/NumberParser: add `noexcept` --- src/util/NumberParser.hxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/NumberParser.hxx b/src/util/NumberParser.hxx index 67d42affa..d514e9dc9 100644 --- a/src/util/NumberParser.hxx +++ b/src/util/NumberParser.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2013 Max Kellermann + * Copyright 2009-2019 Max Kellermann * http://www.musicpd.org * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ #include 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); @@ -44,7 +44,7 @@ ParseUnsigned(const char *p, char **endptr=nullptr, int base=10) } 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); @@ -52,7 +52,7 @@ ParseInt(const char *p, char **endptr=nullptr, int base=10) } 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); @@ -60,7 +60,7 @@ ParseUint64(const char *p, char **endptr=nullptr, int base=10) } 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); @@ -68,7 +68,7 @@ ParseInt64(const char *p, char **endptr=nullptr, int base=10) } static inline double -ParseDouble(const char *p, char **endptr=nullptr) +ParseDouble(const char *p, char **endptr=nullptr) noexcept { assert(p != nullptr); @@ -76,7 +76,7 @@ ParseDouble(const char *p, char **endptr=nullptr) } static inline float -ParseFloat(const char *p, char **endptr=nullptr) +ParseFloat(const char *p, char **endptr=nullptr) noexcept { #if defined(__BIONIC__) && __ANDROID_API__ < 21 /* strtof() requires API level 21 */