summaryrefslogtreecommitdiff
path: root/src/util/StringBuffer.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-01-24 12:52:05 +0100
committerMax Kellermann <max@musicpd.org>2018-01-24 12:52:05 +0100
commitfe1f3df36ea50f06543817173ccd5a9ea89c2655 (patch)
tree01dc7cd7d499b04f468903f740a64e8239e68c73 /src/util/StringBuffer.hxx
parent4a330a4c3371c1d11935b5e72fbaf5e4e0c21df2 (diff)
util/StringBuffer: add "noexcept"
Diffstat (limited to 'src/util/StringBuffer.hxx')
-rw-r--r--src/util/StringBuffer.hxx24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/util/StringBuffer.hxx b/src/util/StringBuffer.hxx
index 86574502d..4fbcde234 100644
--- a/src/util/StringBuffer.hxx
+++ b/src/util/StringBuffer.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2017 Max Kellermann <max.kellermann@gmail.com>
+ * Copyright (C) 2010-2018 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,53 +53,53 @@ protected:
public:
typedef typename Array::const_iterator const_iterator;
- constexpr size_type capacity() const {
+ constexpr size_type capacity() const noexcept {
return CAPACITY;
}
- constexpr bool empty() const {
+ constexpr bool empty() const noexcept {
return front() == SENTINEL;
}
- void clear() {
+ void clear() noexcept {
the_data[0] = SENTINEL;
}
- constexpr const_pointer c_str() const {
+ constexpr const_pointer c_str() const noexcept {
return &the_data.front();
}
- pointer data() {
+ pointer data() noexcept {
return &the_data.front();
}
- constexpr value_type front() const {
+ constexpr value_type front() const noexcept {
return the_data.front();
}
/**
* Returns one character. No bounds checking.
*/
- value_type operator[](size_type i) const {
+ value_type operator[](size_type i) const noexcept {
return the_data[i];
}
/**
* Returns one writable character. No bounds checking.
*/
- reference operator[](size_type i) {
+ reference operator[](size_type i) noexcept {
return the_data[i];
}
- constexpr const_iterator begin() const {
+ constexpr const_iterator begin() const noexcept {
return the_data.begin();
}
- constexpr const_iterator end() const {
+ constexpr const_iterator end() const noexcept {
return the_data.end();
}
- constexpr operator const_pointer() const {
+ constexpr operator const_pointer() const noexcept {
return c_str();
}
};