mdbx++: add [[maybe_unused]] to internal functions which depends on platform and compiler features.

This commit is contained in:
Leonid Yuriev 2021-05-11 16:52:06 +03:00
parent 605326b6e8
commit ed58ff9f81

View File

@ -204,7 +204,7 @@ template <typename PATH> struct path_to_pchar {
operator const char *() const { return str.c_str(); }
};
template <typename PATH> PATH pchar_to_path(const char *c_str) {
template <typename PATH>[[maybe_unused]] PATH pchar_to_path(const char *c_str) {
return PATH(c_str);
}
@ -241,7 +241,8 @@ template <> struct path_to_pchar<std::wstring> {
operator const char *() const { return str.c_str(); }
};
template <> std::wstring pchar_to_path<std::wstring>(const char *c_str) {
template <>
[[maybe_unused]] std::wstring pchar_to_path<std::wstring>(const char *c_str) {
std::wstring wstr;
if (c_str && *c_str) {
const int chars = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, c_str,