From d013cb2f0d41de5e516427808e25515f6c2bdedd Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Thu, 24 May 2018 17:06:20 +0200 Subject: [PATCH] library.h: Improved const correctness of some function arguments. --- lib/library.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/library.h b/lib/library.h index 730635df8..627adfcb1 100644 --- a/lib/library.h +++ b/lib/library.h @@ -126,18 +126,18 @@ public: } /** is allocation type memory? */ - static bool ismemory(int id) { + static bool ismemory(const int id) { return ((id > 0) && ((id & 1) == 0)); } - static bool ismemory(const AllocFunc* func) { + static bool ismemory(const AllocFunc* const func) { return ((func->groupId > 0) && ((func->groupId & 1) == 0)); } /** is allocation type resource? */ - static bool isresource(int id) { + static bool isresource(const int id) { return ((id > 0) && ((id & 1) == 1)); } - static bool isresource(const AllocFunc* func) { + static bool isresource(const AllocFunc* const func) { return ((func->groupId > 0) && ((func->groupId & 1) == 1)); }