From 643bf95366e31d20ef010cad7f41df70e57cd823 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 28 Sep 2020 12:16:07 +0200 Subject: [PATCH] util/OffsetPointer: use std::ptrdiff_t --- src/util/OffsetPointer.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/OffsetPointer.hxx b/src/util/OffsetPointer.hxx index 217a2ba5d..e2621dd12 100644 --- a/src/util/OffsetPointer.hxx +++ b/src/util/OffsetPointer.hxx @@ -35,7 +35,7 @@ * Offset the given pointer by the specified number of bytes. */ constexpr void * -OffsetPointer(void *p, ptrdiff_t offset) noexcept +OffsetPointer(void *p, std::ptrdiff_t offset) noexcept { return (char *)p + offset; } @@ -44,7 +44,7 @@ OffsetPointer(void *p, ptrdiff_t offset) noexcept * Offset the given pointer by the specified number of bytes. */ constexpr const void * -OffsetPointer(const void *p, ptrdiff_t offset) noexcept +OffsetPointer(const void *p, std::ptrdiff_t offset) noexcept { return (const char *)p + offset; }