From 80ebb4b67a1ecb65eea79c140e8106bff5c39106 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Thu, 6 Aug 2020 12:02:57 -0700 Subject: [PATCH] Mark zeek::util::pad_size as constexpr, which provides a small performance improvement --- src/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.h b/src/util.h index c49961680c..bc19b35b44 100644 --- a/src/util.h +++ b/src/util.h @@ -473,7 +473,7 @@ struct ltstr { // Versions of realloc/malloc which abort() on out of memory -inline size_t pad_size(size_t size) +constexpr size_t pad_size(size_t size) { // We emulate glibc here (values measured on Linux i386). // FIXME: We should better copy the portable value definitions from glibc.