From 7e2cc1136025ce1dc06f5effd7a5e41b67d9b62d Mon Sep 17 00:00:00 2001 From: neargye Date: Wed, 29 Jun 2022 16:40:42 +0400 Subject: [PATCH] fix warnings --- include/nameof.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index 48dcdd1..f5ccf2c 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -68,6 +68,7 @@ # pragma warning(disable : 26495) // Variable 'cstring::chars_' is uninitialized. # pragma warning(disable : 28020) // Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. # pragma warning(disable : 26451) // The expression '0<=_Param_(1)&&_Param_(1)<=1-1' is not true at this call. +# pragma warning(disable : 4514) // Unreferenced inline function has been removed. #endif // Checks nameof_type compiler compatibility. @@ -961,7 +962,7 @@ template return detail::strings_v[idx]; } } else { - return detail::strings_v[i]; + return detail::strings_v[static_cast(i)]; } }