From e8a9846bf49b04051796931e93996c3431d61d0b Mon Sep 17 00:00:00 2001 From: dm1sh Date: Sat, 11 Dec 2021 20:39:25 +0300 Subject: [PATCH] Fixed constexpr definition of Method::is_num --- QRCodeLibrary/Method.cpp | 5 ----- QRCodeLibrary/method.hpp | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/QRCodeLibrary/Method.cpp b/QRCodeLibrary/Method.cpp index b573028..22da80f 100644 --- a/QRCodeLibrary/Method.cpp +++ b/QRCodeLibrary/Method.cpp @@ -21,11 +21,6 @@ QRCodeMethod Method::determite_method(string input) return type; } -constexpr bool Method::is_num(char ch) -{ - return ch >= '0' && ch <= '9'; -} - bool Method::is_alphabetic(char ch) { return find(Tables::alphabetic.cbegin(), Tables::alphabetic.cend(), ch) != Tables::alphabetic.cend(); diff --git a/QRCodeLibrary/method.hpp b/QRCodeLibrary/method.hpp index d3a7d5d..6e7a3a0 100644 --- a/QRCodeLibrary/method.hpp +++ b/QRCodeLibrary/method.hpp @@ -22,6 +22,6 @@ class Method { public: static QRCodeMethod determite_method(string input); - static constexpr bool is_num(char ch); + static constexpr bool is_num(char ch) { return ch >= '0' && ch <= '9'; }; static bool is_alphabetic(char ch); }; \ No newline at end of file