diff options
author | onqtam <vik.kirilov@gmail.com> | 2018-04-30 22:16:58 +0300 |
---|---|---|
committer | onqtam <vik.kirilov@gmail.com> | 2018-05-10 16:18:43 +0300 |
commit | 3ae0631bad6aeb622ad2591a4eb559e79f862be0 (patch) | |
tree | ae96d4540067b3838ece68deb76ec808ddcfc57e | |
parent | bf2e7577e039c5a669ca1efae2321640533d1783 (diff) |
small comments
-rw-r--r-- | doctest/doctest.h | 5 | ||||
-rw-r--r-- | doctest/parts/doctest_impl.h | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/doctest/doctest.h b/doctest/doctest.h index 5a5a03b..febac6e 100644 --- a/doctest/doctest.h +++ b/doctest/doctest.h @@ -3326,7 +3326,7 @@ namespace doctest { namespace detail { - // lowers ascii letters + // rolled my own tolower() to not include more headers char tolower(const char c) { return (c >= 'A' && c <= 'Z') ? static_cast<char>(c + 32) : c; } template <typename T> @@ -3958,12 +3958,11 @@ namespace detail } // matching of a string against a wildcard mask (case sensitivity configurable) taken from - // http://www.emoticode.net/c/simple-wildcard-string-compare-globbing-function.html + // https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing int wildcmp(const char* str, const char* wild, bool caseSensitive) { const char* cp = 0; const char* mp = 0; - // rolled my own tolower() to not include more headers while((*str) && (*wild != '*')) { if((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) && (*wild != '?')) { diff --git a/doctest/parts/doctest_impl.h b/doctest/parts/doctest_impl.h index c1fc382..166766f 100644 --- a/doctest/parts/doctest_impl.h +++ b/doctest/parts/doctest_impl.h @@ -124,7 +124,7 @@ namespace doctest { namespace detail { - // lowers ascii letters + // rolled my own tolower() to not include more headers char tolower(const char c) { return (c >= 'A' && c <= 'Z') ? static_cast<char>(c + 32) : c; } template <typename T> @@ -756,12 +756,11 @@ namespace detail } // matching of a string against a wildcard mask (case sensitivity configurable) taken from - // http://www.emoticode.net/c/simple-wildcard-string-compare-globbing-function.html + // https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing int wildcmp(const char* str, const char* wild, bool caseSensitive) { const char* cp = 0; const char* mp = 0; - // rolled my own tolower() to not include more headers while((*str) && (*wild != '*')) { if((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) && (*wild != '?')) { |