mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-26 10:04:28 +08:00
mdbx: add public MDBX_MAYBE_UNUSED
.
This also should fix C++ mdbx API build by MSVC 2015.
This commit is contained in:
@@ -204,7 +204,8 @@ template <typename PATH> struct path_to_pchar {
|
||||
operator const char *() const { return str.c_str(); }
|
||||
};
|
||||
|
||||
template <typename PATH>[[maybe_unused]] PATH pchar_to_path(const char *c_str) {
|
||||
template <typename PATH>
|
||||
MDBX_MAYBE_UNUSED PATH pchar_to_path(const char *c_str) {
|
||||
return PATH(c_str);
|
||||
}
|
||||
|
||||
@@ -242,7 +243,7 @@ template <> struct path_to_pchar<std::wstring> {
|
||||
};
|
||||
|
||||
template <>
|
||||
[[maybe_unused]] std::wstring pchar_to_path<std::wstring>(const char *c_str) {
|
||||
MDBX_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,
|
||||
|
Reference in New Issue
Block a user