diff --git a/beast/nudb/api.h b/beast/nudb/api.h index 65ad74919..4891b364f 100644 --- a/beast/nudb/api.h +++ b/beast/nudb/api.h @@ -21,6 +21,7 @@ #define BEAST_NUDB_API_H_INCLUDED #include +#include #include #include #include @@ -34,7 +35,7 @@ namespace nudb { // template < class Hasher, - class Codec, + class Codec = identity, class File = native_file, std::size_t BufferSize = 16 * 1024 * 1024 > diff --git a/beast/nudb/identity_codec.h b/beast/nudb/identity.h similarity index 97% rename from beast/nudb/identity_codec.h rename to beast/nudb/identity.h index 0846e3002..18b3dcad8 100644 --- a/beast/nudb/identity_codec.h +++ b/beast/nudb/identity.h @@ -26,12 +26,12 @@ namespace beast { namespace nudb { /** Codec which maps input directly to output. */ -class identity_codec +class identity { public: template explicit - identity_codec(Args&&... args) + identity(Args&&... args) { } diff --git a/beast/nudb/store.h b/beast/nudb/store.h index 49b4abbb1..e06c00828 100644 --- a/beast/nudb/store.h +++ b/beast/nudb/store.h @@ -372,7 +372,7 @@ store::open ( key_file_header kh; read (df, dh); read (kf, kh); - verify (dh); + verify (dh); verify (kh); verify (dh, kh); auto s = std::make_unique( diff --git a/beast/nudb/tests/common.h b/beast/nudb/tests/common.h index 82c6e5143..4f7e456f2 100644 --- a/beast/nudb/tests/common.h +++ b/beast/nudb/tests/common.h @@ -21,7 +21,7 @@ #define BEAST_NUDB_TESTS_COMMON_H_INCLUDED #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ using key_type = std::size_t; // xxhasher is fast and produces good results using test_api_base = - nudb::api; + nudb::api; struct test_api : test_api_base { diff --git a/beast/nudb/visit.h b/beast/nudb/visit.h index d0167b5fd..9243101f6 100644 --- a/beast/nudb/visit.h +++ b/beast/nudb/visit.h @@ -56,7 +56,7 @@ visit( df.open (file_mode::scan, path); dat_file_header dh; read (df, dh); - verify (dh); + verify (dh); Codec codec; // Iterate Data File bulk_reader r( diff --git a/beast/nudb/win32_file.h b/beast/nudb/win32_file.h index ca6a21a93..467f9abf6 100644 --- a/beast/nudb/win32_file.h +++ b/beast/nudb/win32_file.h @@ -42,6 +42,9 @@ # ifndef STRICT # define STRICT # endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include # undef NOMINMAX # undef UNICODE