diff --git a/src/applib/app_pcrecpp.h b/src/applib/app_pcrecpp.h index 97afc4c..25897be 100644 --- a/src/applib/app_pcrecpp.h +++ b/src/applib/app_pcrecpp.h @@ -178,6 +178,7 @@ pcrecpp::RE_Options app_pcre_get_options(std::string_view modifiers) { // ANYCRLF means any of crlf, cr, lf. Used in ^ and $. // This overrides the build-time newline setting of pcre. + // Defined to 0x00500000. #ifdef PCRE_NEWLINE_ANYCRLF // not available in older versions of pcre1, not wrapped in pcrecpp pcrecpp::RE_Options options(PCRE_NEWLINE_ANYCRLF); #else diff --git a/src/hz/win32_tools.h b/src/hz/win32_tools.h index 33e561d..3c65e48 100644 --- a/src/hz/win32_tools.h +++ b/src/hz/win32_tools.h @@ -28,7 +28,6 @@ Copyright: #include // _fdopen, _wfopen, _wremove #include // std::atexit #include // std::strlen -#include // std::wcslen #include // std::ios::sync_with_stdio #include @@ -415,7 +414,7 @@ namespace internal { // This function doesn't write terminating 0 if the buffer is insufficient, // so we reserve some space for it. if (GetModuleFileNameW(nullptr, name.data(), MAX_PATH - 1) == TRUE) { - std::wstring wname(name.data(), std::wcslen(name.data())); + std::wstring wname(name.data()); std::wstring::size_type pos = wname.find_last_of(L'.'); wname = wname.substr(0, pos); // full path, including the executable without extension. if (!wname.empty()) { @@ -620,7 +619,7 @@ inline std::string win32_utf16_to_utf8(std::wstring_view utf16_str, bool* ok) template std::string win32_utf16_to_utf8(const std::array& utf16_str, bool* ok) { - return win32_utf16_to_user(CP_UTF8, {utf16_str.data(), std::wcslen(utf16_str.data())}, ok); + return win32_utf16_to_user(CP_UTF8, {utf16_str.data()}, ok); }