Skip to content

Commit 2f2e7d8

Browse files
committed
Fix compilation on MSVC/Windows
1 parent 64c40af commit 2f2e7d8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

hdr/sqlite_modern_cpp/log.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ namespace sqlite {
9393
}
9494
});
9595

96-
sqlite3_config(SQLITE_CONFIG_LOG, (void(*)(void*,int,const char*))[](void *functor, int error_code, const char *errstr) {
96+
sqlite3_config(SQLITE_CONFIG_LOG, static_cast<void(*)(void*,int,const char*)>([](void *functor, int error_code, const char *errstr) {
9797
(*static_cast<decltype(ptr.get())>(functor))(error_code, errstr);
98-
}, ptr.get());
98+
}), ptr.get());
9999
detail::store_error_log_data_pointer(std::move(ptr));
100100
}
101101
}

tests/flags.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ struct TmpFile {
1313
TmpFile(): fname("./flags.db") { }
1414
~TmpFile() { remove(fname.c_str()); }
1515
};
16-
17-
#if BYTE_ORDER == BIG_ENDIAN
16+
#ifdef _WIN32
17+
#define OUR_UTF16 "UTF-16le"
18+
#elif BYTE_ORDER == BIG_ENDIAN
1819
#define OUR_UTF16 "UTF-16be"
1920
#else
2021
#define OUR_UTF16 "UTF-16le"

0 commit comments

Comments
 (0)