util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL

This commit is contained in:
Max Kellermann
2017-11-10 19:24:33 +01:00
parent 523051132d
commit 49784513b1
51 changed files with 142 additions and 142 deletions

View File

@@ -84,7 +84,7 @@ struct ConstBuffer<void> {
return data != nullptr;
}
constexpr bool IsEmpty() const {
constexpr bool empty() const {
return size == 0;
}
};
@@ -167,7 +167,7 @@ struct ConstBuffer {
return data != nullptr;
}
constexpr bool IsEmpty() const {
constexpr bool empty() const {
return size == 0;
}
@@ -217,7 +217,7 @@ struct ConstBuffer {
#endif
reference_type front() const {
#ifndef NDEBUG
assert(!IsEmpty());
assert(!empty());
#endif
return data[0];
}
@@ -231,7 +231,7 @@ struct ConstBuffer {
#endif
reference_type back() const {
#ifndef NDEBUG
assert(!IsEmpty());
assert(!empty());
#endif
return data[size - 1];
}
@@ -242,7 +242,7 @@ struct ConstBuffer {
*/
void pop_front() {
#ifndef NDEBUG
assert(!IsEmpty());
assert(!empty());
#endif
++data;
@@ -255,7 +255,7 @@ struct ConstBuffer {
*/
void pop_back() {
#ifndef NDEBUG
assert(!IsEmpty());
assert(!empty());
#endif
--size;