From 2e8f42c6ad9f460b666464ee93680b7a1cbf8911 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 16 Dec 2019 22:51:23 +0100 Subject: [PATCH] util/StringBuffer: use std::size_t instead of size_t --- src/util/StringBuffer.hxx | 6 +++--- src/util/StringFormat.hxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/StringBuffer.hxx b/src/util/StringBuffer.hxx index a4dc4189a..07ce6dd31 100644 --- a/src/util/StringBuffer.hxx +++ b/src/util/StringBuffer.hxx @@ -35,14 +35,14 @@ /** * A statically allocated string buffer. */ -template +template class BasicStringBuffer { public: typedef T value_type; typedef T &reference; typedef T *pointer; typedef const T *const_pointer; - typedef size_t size_type; + typedef std::size_t size_type; static constexpr value_type SENTINEL = '\0'; @@ -104,7 +104,7 @@ public: } }; -template +template class StringBuffer : public BasicStringBuffer {}; #endif diff --git a/src/util/StringFormat.hxx b/src/util/StringFormat.hxx index 4fee2fc37..723591c69 100644 --- a/src/util/StringFormat.hxx +++ b/src/util/StringFormat.hxx @@ -36,13 +36,13 @@ template static inline void -StringFormat(char *buffer, size_t size, +StringFormat(char *buffer, std::size_t size, const char *fmt, Args&&... args) noexcept { snprintf(buffer, size, fmt, args...); } -template +template static inline void StringFormat(StringBuffer &buffer, const char *fmt, Args&&... args) noexcept @@ -50,7 +50,7 @@ StringFormat(StringBuffer &buffer, StringFormat(buffer.data(), buffer.capacity(), fmt, args...); } -template +template static inline StringBuffer StringFormat(const char *fmt, Args&&... args) noexcept {