- fix Windows build

This commit is contained in:
Dmytro Bogovych 2025-06-02 10:18:14 +03:00
parent 83373cb586
commit 474256bc88
3 changed files with 6 additions and 4 deletions

View File

@ -430,10 +430,8 @@ std::string strx::removeQuotes(const std::string& s)
const void *memmem(const void *haystack, size_t haystack_len, const void *memmem(const void *haystack, size_t haystack_len,
const void * const needle, const size_t needle_len) const void * const needle, const size_t needle_len)
{ {
if (haystack == NULL) return NULL; // or assert(haystack != NULL); if (!haystack || !haystack_len || !needle || !needle_len)
if (haystack_len == 0) return NULL; return nullptr;
if (needle == NULL) return NULL; // or assert(needle != NULL);
if (needle_len == 0) return NULL;
for (const char *h = (const char*)haystack; for (const char *h = (const char*)haystack;
haystack_len >= needle_len; haystack_len >= needle_len;

View File

@ -14,3 +14,5 @@ target_include_directories(evs_codec PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/basic_o
${CMAKE_CURRENT_SOURCE_DIR}/lib_enc ${CMAKE_CURRENT_SOURCE_DIR}/lib_enc
${CMAKE_CURRENT_SOURCE_DIR}/lib_dec ${CMAKE_CURRENT_SOURCE_DIR}/lib_dec
${CMAKE_CURRENT_SOURCE_DIR}/lib_com) ${CMAKE_CURRENT_SOURCE_DIR}/lib_com)
set_property(TARGET evs_codec PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

View File

@ -256,6 +256,8 @@ endif()
add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER}) add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER})
add_library(Opus::opus ALIAS opus) add_library(Opus::opus ALIAS opus)
set_property(TARGET opus PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR) get_library_version(OPUS_LIBRARY_VERSION OPUS_LIBRARY_VERSION_MAJOR)
message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}") message(DEBUG "Opus library version: ${OPUS_LIBRARY_VERSION}")