diff options
author | Max Kellermann <max@musicpd.org> | 2020-01-03 15:38:02 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-01-03 15:55:05 +0100 |
commit | e654c6e0057b86f179abfd1df27437ea7dbc6c07 (patch) | |
tree | 7d8978d727d778a362a786bf5785cb7933505022 | |
parent | 4b0e288f00c81f6a4a4b2be621e8e48471e1f47d (diff) |
util/{Const,Writable}Buffer: use std::size_t
-rw-r--r-- | src/util/AllocatedString.hxx | 3 | ||||
-rw-r--r-- | src/util/ConstBuffer.hxx | 6 | ||||
-rw-r--r-- | src/util/ForeignFifoBuffer.hxx | 2 | ||||
-rw-r--r-- | src/util/StaticFifoBuffer.hxx | 4 | ||||
-rw-r--r-- | src/util/WritableBuffer.hxx | 6 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/util/AllocatedString.hxx b/src/util/AllocatedString.hxx index ceb307b3a..74e98333a 100644 --- a/src/util/AllocatedString.hxx +++ b/src/util/AllocatedString.hxx @@ -33,6 +33,7 @@ #include "StringPointer.hxx" #include <algorithm> +#include <cstddef> /** * A string pointer whose memory is managed by this class. @@ -47,7 +48,7 @@ public: typedef typename StringPointer<T>::const_reference_type const_reference_type; typedef typename StringPointer<T>::pointer_type pointer_type; typedef typename StringPointer<T>::const_pointer_type const_pointer_type; - typedef size_t size_type; + typedef std::size_t size_type; static constexpr value_type SENTINEL = '\0'; diff --git a/src/util/ConstBuffer.hxx b/src/util/ConstBuffer.hxx index eddee80e5..f9cf48cc6 100644 --- a/src/util/ConstBuffer.hxx +++ b/src/util/ConstBuffer.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2017 Max Kellermann <max.kellermann@gmail.com> + * Copyright 2013-2020 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 @@ -43,7 +43,7 @@ struct ConstBuffer; template<> struct ConstBuffer<void> { - typedef size_t size_type; + typedef std::size_t size_type; typedef void value_type; typedef const void *pointer_type; typedef pointer_type const_pointer_type; @@ -91,7 +91,7 @@ struct ConstBuffer<void> { */ template<typename T> struct ConstBuffer { - typedef size_t size_type; + typedef std::size_t size_type; typedef T value_type; typedef const T &reference_type; typedef reference_type const_reference_type; diff --git a/src/util/ForeignFifoBuffer.hxx b/src/util/ForeignFifoBuffer.hxx index bea0c1e5f..9d4013323 100644 --- a/src/util/ForeignFifoBuffer.hxx +++ b/src/util/ForeignFifoBuffer.hxx @@ -51,7 +51,7 @@ template<typename T> class ForeignFifoBuffer { public: - using size_type = size_t; + using size_type = std::size_t; using Range = WritableBuffer<T>; using pointer_type = typename Range::pointer_type; using const_pointer_type = typename Range::const_pointer_type; diff --git a/src/util/StaticFifoBuffer.hxx b/src/util/StaticFifoBuffer.hxx index f1a9d14ee..968b6b330 100644 --- a/src/util/StaticFifoBuffer.hxx +++ b/src/util/StaticFifoBuffer.hxx @@ -34,9 +34,9 @@ #include <utility> #include <algorithm> +#include <cstddef> #include <assert.h> -#include <stddef.h> /** * A first-in-first-out buffer: you can append data at the end, and @@ -46,7 +46,7 @@ template<class T, size_t size> class StaticFifoBuffer { public: - using size_type = size_t; + using size_type = std::size_t; using Range = WritableBuffer<T>; protected: diff --git a/src/util/WritableBuffer.hxx b/src/util/WritableBuffer.hxx index ae6e14af5..73b26abbb 100644 --- a/src/util/WritableBuffer.hxx +++ b/src/util/WritableBuffer.hxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2013-2018 Max Kellermann <max.kellermann@gmail.com> + * Copyright 2013-2020 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 @@ -44,7 +44,7 @@ struct WritableBuffer; template<> struct WritableBuffer<void> { - typedef size_t size_type; + typedef std::size_t size_type; typedef void value_type; typedef void *pointer_type; typedef const void *const_pointer_type; @@ -90,7 +90,7 @@ struct WritableBuffer<void> { */ template<typename T> struct WritableBuffer { - typedef size_t size_type; + typedef std::size_t size_type; typedef T value_type; typedef T &reference_type; typedef const T &const_reference_type; |