From 3f4154c5793c0635579236b664845b9bbfe83687 Mon Sep 17 00:00:00 2001 From: Neargye Date: Sun, 13 May 2018 23:28:25 +0500 Subject: [PATCH] v0.2.5 --- include/nameof.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nameof.hpp b/include/nameof.hpp index df1d762..6338bcb 100644 --- a/include/nameof.hpp +++ b/include/nameof.hpp @@ -5,7 +5,7 @@ // | |\ | (_| | | | | | | __/ (_) | | | |____|_| |_| // |_| \_|\__,_|_| |_| |_|\___|\___/|_| \_____| // https://github.com/Neargye/nameof -// vesion 0.2.4 +// vesion 0.2.5 // // Licensed under the MIT License . // Copyright (c) 2016, 2018 Daniil Goncharov . @@ -44,9 +44,9 @@ inline constexpr bool IsLexeme(const char s) noexcept { } // namespace detail inline constexpr const char* Nameof(const char* name, const ::std::size_t length) noexcept { - return length == 0 ? name : detail::IsLexeme(name[length - 1]) - ? &name[length] - : Nameof(name, length - 1); + return ((length == 0) ? name : (detail::IsLexeme(name[length - 1]) + ? &name[length] + : Nameof(name, length - 1))); } } // namespace nameof