From 21c8af467d91f2523e22c941d79cb698a6f3e6df Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 19 Oct 2023 17:07:56 +0200 Subject: [PATCH] Cleanup: Convert winfunc and utfconv to C++ Basically, the intern/utfconv directory, as well as users of these headers. Pull Request: https://projects.blender.org/blender/blender/pulls/113901 --- extern/wcwidth/wcwidth.h | 8 ++++++ intern/ghost/intern/GHOST_DropTargetWin32.cc | 4 +-- intern/ghost/intern/GHOST_ImeWin32.cc | 2 +- intern/ghost/intern/GHOST_SystemPathsWin32.cc | 2 +- intern/ghost/intern/GHOST_SystemWin32.cc | 4 +-- intern/ghost/intern/GHOST_WindowWin32.cc | 4 +-- intern/utfconv/CMakeLists.txt | 8 +++--- .../utfconv/{utf_winfunc.c => utf_winfunc.cc} | 4 +-- .../utfconv/{utf_winfunc.h => utf_winfunc.hh} | 0 intern/utfconv/{utfconv.c => utfconv.cc} | 2 +- intern/utfconv/{utfconv.h => utfconv.hh} | 8 ------ source/blender/blenkernel/intern/appdir.cc | 4 +-- source/blender/blenlib/CMakeLists.txt | 10 +++---- source/blender/blenlib/intern/BLI_filelist.cc | 2 +- .../blenlib/intern/{dynlib.c => dynlib.cc} | 12 ++++---- source/blender/blenlib/intern/fileops.cc | 2 +- source/blender/blenlib/intern/fileops_c.cc | 4 +-- source/blender/blenlib/intern/path_util.cc | 4 +-- .../blenlib/intern/{storage.c => storage.cc} | 28 +++++++++---------- .../intern/{string_utf8.c => string_utf8.cc} | 14 +++++----- .../intern/{winstuff.c => winstuff.cc} | 4 +-- .../{winstuff_dir.c => winstuff_dir.cc} | 4 +-- source/blender/datatoc/CMakeLists.txt | 6 ++-- .../imbuf/intern/openexr/openexr_api.cpp | 2 +- source/blender/imbuf/intern/thumbs.cc | 2 +- .../io/alembic/exporter/abc_archive.cc | 2 +- .../io/alembic/intern/abc_reader_archive.cc | 2 +- .../gpencil/intern/gpencil_io_export_pdf.cc | 2 +- .../gpencil/intern/gpencil_io_export_svg.cc | 2 +- source/creator/creator.cc | 2 +- 30 files changed, 77 insertions(+), 77 deletions(-) rename intern/utfconv/{utf_winfunc.c => utf_winfunc.cc} (98%) rename intern/utfconv/{utf_winfunc.h => utf_winfunc.hh} (100%) rename intern/utfconv/{utfconv.c => utfconv.cc} (99%) rename intern/utfconv/{utfconv.h => utfconv.hh} (97%) rename source/blender/blenlib/intern/{dynlib.c => dynlib.cc} (88%) rename source/blender/blenlib/intern/{storage.c => storage.cc} (94%) rename source/blender/blenlib/intern/{string_utf8.c => string_utf8.cc} (99%) rename source/blender/blenlib/intern/{winstuff.c => winstuff.cc} (99%) rename source/blender/blenlib/intern/{winstuff_dir.c => winstuff_dir.cc} (97%) diff --git a/extern/wcwidth/wcwidth.h b/extern/wcwidth/wcwidth.h index 08e398f85eb..320a6ea130d 100644 --- a/extern/wcwidth/wcwidth.h +++ b/extern/wcwidth/wcwidth.h @@ -30,9 +30,17 @@ typedef unsigned int char32_t; # endif #endif +#ifdef __cplusplus +extern "C" { +#endif + int mk_wcwidth(char32_t ucs); int mk_wcswidth(const char32_t *pwcs, size_t n); int mk_wcwidth_cjk(char32_t ucs); int mk_wcswidth_cjk(const char32_t *pwcs, size_t n); +#ifdef __cplusplus +} +#endif + #endif diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.cc b/intern/ghost/intern/GHOST_DropTargetWin32.cc index e44be902779..1c56c3b79b8 100644 --- a/intern/ghost/intern/GHOST_DropTargetWin32.cc +++ b/intern/ghost/intern/GHOST_DropTargetWin32.cc @@ -10,8 +10,8 @@ #include "GHOST_Debug.hh" #include -#include "utf_winfunc.h" -#include "utfconv.h" +#include "utf_winfunc.hh" +#include "utfconv.hh" #ifdef WITH_GHOST_DEBUG /* utility */ diff --git a/intern/ghost/intern/GHOST_ImeWin32.cc b/intern/ghost/intern/GHOST_ImeWin32.cc index 9b11c73ebe6..438ebd0c099 100644 --- a/intern/ghost/intern/GHOST_ImeWin32.cc +++ b/intern/ghost/intern/GHOST_ImeWin32.cc @@ -11,7 +11,7 @@ # include "GHOST_ImeWin32.hh" # include "GHOST_C-api.h" # include "GHOST_WindowWin32.hh" -# include "utfconv.h" +# include "utfconv.hh" /* ISO_639-1 2-Letter Abbreviations. */ # define IMELANG_ENGLISH "en" diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.cc b/intern/ghost/intern/GHOST_SystemPathsWin32.cc index 58fea5ebc19..cb183a9e8a7 100644 --- a/intern/ghost/intern/GHOST_SystemPathsWin32.cc +++ b/intern/ghost/intern/GHOST_SystemPathsWin32.cc @@ -12,7 +12,7 @@ #ifndef _WIN32_IE # define _WIN32_IE 0x0501 #endif -#include "utfconv.h" +#include "utfconv.hh" #include GHOST_SystemPathsWin32::GHOST_SystemPathsWin32() {} diff --git a/intern/ghost/intern/GHOST_SystemWin32.cc b/intern/ghost/intern/GHOST_SystemWin32.cc index 5fdeb83fc6e..0380c4c511b 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cc +++ b/intern/ghost/intern/GHOST_SystemWin32.cc @@ -23,8 +23,8 @@ #include #include -#include "utf_winfunc.h" -#include "utfconv.h" +#include "utf_winfunc.hh" +#include "utfconv.hh" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" diff --git a/intern/ghost/intern/GHOST_WindowWin32.cc b/intern/ghost/intern/GHOST_WindowWin32.cc index f3bf84a3dd2..d1af0ae01af 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cc +++ b/intern/ghost/intern/GHOST_WindowWin32.cc @@ -12,8 +12,8 @@ #include "GHOST_DropTargetWin32.hh" #include "GHOST_SystemWin32.hh" #include "GHOST_WindowManager.hh" -#include "utf_winfunc.h" -#include "utfconv.h" +#include "utf_winfunc.hh" +#include "utfconv.hh" #ifdef WITH_OPENGL_BACKEND # include "GHOST_ContextWGL.hh" diff --git a/intern/utfconv/CMakeLists.txt b/intern/utfconv/CMakeLists.txt index 057fc4d43ee..0f567f13a7c 100644 --- a/intern/utfconv/CMakeLists.txt +++ b/intern/utfconv/CMakeLists.txt @@ -11,9 +11,9 @@ set(INC_SYS ) set(SRC - utfconv.c + utfconv.cc - utfconv.h + utfconv.hh ) set(LIB @@ -24,8 +24,8 @@ set(LIB # ... because one day we might want to use it on other platforms. if(WIN32) list(APPEND SRC - utf_winfunc.c - utf_winfunc.h + utf_winfunc.cc + utf_winfunc.hh ) endif() diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.cc similarity index 98% rename from intern/utfconv/utf_winfunc.c rename to intern/utfconv/utf_winfunc.cc index e76b43c9813..673be18b139 100644 --- a/intern/utfconv/utf_winfunc.c +++ b/intern/utfconv/utf_winfunc.cc @@ -10,8 +10,8 @@ # define _WIN32_IE 0x0501 #endif -#include "utf_winfunc.h" -#include "utfconv.h" +#include "utf_winfunc.hh" +#include "utfconv.hh" #include #include #include diff --git a/intern/utfconv/utf_winfunc.h b/intern/utfconv/utf_winfunc.hh similarity index 100% rename from intern/utfconv/utf_winfunc.h rename to intern/utfconv/utf_winfunc.hh diff --git a/intern/utfconv/utfconv.c b/intern/utfconv/utfconv.cc similarity index 99% rename from intern/utfconv/utfconv.c rename to intern/utfconv/utfconv.cc index ddc47153dfe..46afdf4de8a 100644 --- a/intern/utfconv/utfconv.c +++ b/intern/utfconv/utfconv.cc @@ -6,7 +6,7 @@ * \ingroup intern_utf_conv */ -#include "utfconv.h" +#include "utfconv.hh" size_t count_utf_8_from_16(const wchar_t *string16) { diff --git a/intern/utfconv/utfconv.h b/intern/utfconv/utfconv.hh similarity index 97% rename from intern/utfconv/utfconv.h rename to intern/utfconv/utfconv.hh index 441814f8dd7..075ccadff65 100644 --- a/intern/utfconv/utfconv.h +++ b/intern/utfconv/utfconv.hh @@ -13,10 +13,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - /** * Counts how many bytes is required for future utf-8 string using utf-16 * \param string16: pointer to working utf-16 string @@ -90,8 +86,4 @@ wchar_t *alloc_utf16_from_8(const char *in8, size_t add); } \ (void)0 -#ifdef __cplusplus -} -#endif - #endif /* __UTFCONV_H__ */ diff --git a/source/blender/blenkernel/intern/appdir.cc b/source/blender/blenkernel/intern/appdir.cc index 4b86a9c5aaa..36e869d4dbc 100644 --- a/source/blender/blenkernel/intern/appdir.cc +++ b/source/blender/blenkernel/intern/appdir.cc @@ -34,8 +34,8 @@ #include "CLG_log.h" #ifdef WIN32 -# include "utf_winfunc.h" -# include "utfconv.h" +# include "utf_winfunc.hh" +# include "utfconv.hh" # include # ifdef _WIN32_IE # undef _WIN32_IE diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 0dfe809e082..c54d584db77 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -61,7 +61,7 @@ set(SRC intern/cpp_types.cc intern/delaunay_2d.cc intern/dot_export.cc - intern/dynlib.c + intern/dynlib.cc intern/easing.c intern/endian_switch.c intern/expr_pylike_eval.c @@ -136,12 +136,12 @@ set(SRC intern/sort.c intern/sort_utils.c intern/stack.c - intern/storage.c + intern/storage.cc intern/string.c intern/string_cursor_utf8.c intern/string_ref.cc intern/string_search.cc - intern/string_utf8.c + intern/string_utf8.cc intern/string_utils.cc intern/system.c intern/task_graph.cc @@ -160,8 +160,8 @@ set(SRC intern/virtual_array.cc intern/voronoi_2d.c intern/voxel.c - intern/winstuff.c - intern/winstuff_dir.c + intern/winstuff.cc + intern/winstuff_dir.cc # Private headers. intern/BLI_mempool_private.h diff --git a/source/blender/blenlib/intern/BLI_filelist.cc b/source/blender/blenlib/intern/BLI_filelist.cc index 5dd17c4ef0b..97d7dede0ac 100644 --- a/source/blender/blenlib/intern/BLI_filelist.cc +++ b/source/blender/blenlib/intern/BLI_filelist.cc @@ -21,7 +21,7 @@ #ifdef WIN32 # include "BLI_winstuff.h" -# include "utfconv.h" +# include "utfconv.hh" # include # include #else diff --git a/source/blender/blenlib/intern/dynlib.c b/source/blender/blenlib/intern/dynlib.cc similarity index 88% rename from source/blender/blenlib/intern/dynlib.c rename to source/blender/blenlib/intern/dynlib.cc index 6cf18708890..792a0a1474d 100644 --- a/source/blender/blenlib/intern/dynlib.c +++ b/source/blender/blenlib/intern/dynlib.cc @@ -20,8 +20,8 @@ struct DynamicLibrary { #ifdef WIN32 # define WIN32_LEAN_AND_MEAN -# include "utf_winfunc.h" -# include "utfconv.h" +# include "utf_winfunc.hh" +# include "utfconv.hh" # include DynamicLibrary *BLI_dynlib_open(const char *name) @@ -37,7 +37,7 @@ DynamicLibrary *BLI_dynlib_open(const char *name) return NULL; } - lib = MEM_callocN(sizeof(*lib), "Dynamic Library"); + lib = MEM_cnew("Dynamic Library"); lib->handle = handle; return lib; @@ -45,7 +45,7 @@ DynamicLibrary *BLI_dynlib_open(const char *name) void *BLI_dynlib_find_symbol(DynamicLibrary *lib, const char *symname) { - return GetProcAddress(lib->handle, symname); + return GetProcAddress(HMODULE(lib->handle), symname); } char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib) @@ -78,7 +78,7 @@ char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib) void BLI_dynlib_close(DynamicLibrary *lib) { - FreeLibrary(lib->handle); + FreeLibrary(HMODULE(lib->handle)); MEM_freeN(lib); } @@ -95,7 +95,7 @@ DynamicLibrary *BLI_dynlib_open(const char *name) return NULL; } - lib = MEM_callocN(sizeof(*lib), "Dynamic Library"); + lib = MEM_cnew("Dynamic Library"); lib->handle = handle; return lib; diff --git a/source/blender/blenlib/intern/fileops.cc b/source/blender/blenlib/intern/fileops.cc index c402721b891..32a5d60a400 100644 --- a/source/blender/blenlib/intern/fileops.cc +++ b/source/blender/blenlib/intern/fileops.cc @@ -9,7 +9,7 @@ #include "BLI_fileops.hh" #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" #endif namespace blender { diff --git a/source/blender/blenlib/intern/fileops_c.cc b/source/blender/blenlib/intern/fileops_c.cc index 5207c1f1608..7ccddca439f 100644 --- a/source/blender/blenlib/intern/fileops_c.cc +++ b/source/blender/blenlib/intern/fileops_c.cc @@ -21,8 +21,8 @@ #ifdef WIN32 # include "BLI_fileops_types.h" # include "BLI_winstuff.h" -# include "utf_winfunc.h" -# include "utfconv.h" +# include "utf_winfunc.hh" +# include "utfconv.hh" # include # include # include diff --git a/source/blender/blenlib/intern/path_util.cc b/source/blender/blenlib/intern/path_util.cc index ed9ef89f794..a9ae6fd504b 100644 --- a/source/blender/blenlib/intern/path_util.cc +++ b/source/blender/blenlib/intern/path_util.cc @@ -22,8 +22,8 @@ #include "BLI_utildefines.h" #ifdef WIN32 -# include "utf_winfunc.h" -# include "utfconv.h" +# include "utf_winfunc.hh" +# include "utfconv.hh" # include # ifdef _WIN32_IE # undef _WIN32_IE diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.cc similarity index 94% rename from source/blender/blenlib/intern/storage.c rename to source/blender/blenlib/intern/storage.cc index 0215b8695c6..433fa3294ff 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.cc @@ -37,7 +37,7 @@ #ifdef WIN32 # include "BLI_string_utf8.h" # include "BLI_winstuff.h" -# include "utfconv.h" +# include "utfconv.hh" # include # include # include @@ -235,14 +235,14 @@ eFileAttributes BLI_file_attributes(const char *path) WCHAR wline[FILE_MAXDIR]; if (conv_utf_8_to_16(path, wline, ARRAY_SIZE(wline)) != 0) { - return ret; + return eFileAttributes(ret); } DWORD attr = GetFileAttributesW(wline); if (attr == INVALID_FILE_ATTRIBUTES) { BLI_assert_msg(GetLastError() != ERROR_FILE_NOT_FOUND, "BLI_file_attributes should only be called on existing files."); - return ret; + return eFileAttributes(ret); } if (attr & FILE_ATTRIBUTE_READONLY) { @@ -287,7 +287,7 @@ eFileAttributes BLI_file_attributes(const char *path) * If Archived set FILE_ATTR_ARCHIVE */ # endif - return ret; + return eFileAttributes(ret); } #endif @@ -311,30 +311,30 @@ bool BLI_file_alias_target(const char *filepath, IShellLinkW *Shortcut = NULL; hr = CoCreateInstance( - &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID *)&Shortcut); + CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (LPVOID *)&Shortcut); bool success = false; if (SUCCEEDED(hr)) { IPersistFile *PersistFile; - hr = Shortcut->lpVtbl->QueryInterface(Shortcut, &IID_IPersistFile, (LPVOID *)&PersistFile); + hr = Shortcut->QueryInterface(IID_IPersistFile, (LPVOID *)&PersistFile); if (SUCCEEDED(hr)) { WCHAR path_utf16[FILE_MAXDIR] = {0}; if (conv_utf_8_to_16(filepath, path_utf16, ARRAY_SIZE(path_utf16)) == 0) { - hr = PersistFile->lpVtbl->Load(PersistFile, path_utf16, STGM_READ); + hr = PersistFile->Load(path_utf16, STGM_READ); if (SUCCEEDED(hr)) { - hr = Shortcut->lpVtbl->Resolve(Shortcut, 0, SLR_NO_UI | SLR_UPDATE); + hr = Shortcut->Resolve(0, SLR_NO_UI | SLR_UPDATE); if (SUCCEEDED(hr)) { wchar_t target_utf16[FILE_MAXDIR] = {0}; - hr = Shortcut->lpVtbl->GetPath(Shortcut, target_utf16, FILE_MAXDIR, NULL, 0); + hr = Shortcut->GetPath(target_utf16, FILE_MAXDIR, NULL, 0); if (SUCCEEDED(hr)) { success = (conv_utf_16_to_8(target_utf16, r_targetpath, FILE_MAXDIR) == 0); } } - PersistFile->lpVtbl->Release(PersistFile); + PersistFile->Release(); } } } - Shortcut->lpVtbl->Release(Shortcut); + Shortcut->Release(); } CoUninitialize(); @@ -526,14 +526,14 @@ void *BLI_file_read_text_as_mem_with_newline_as_nil(const char *filepath, size_t pad_bytes, size_t *r_size) { - char *mem = BLI_file_read_text_as_mem(filepath, pad_bytes, r_size); + char *mem = static_cast(BLI_file_read_text_as_mem(filepath, pad_bytes, r_size)); if (mem != NULL) { char *mem_end = mem + *r_size; if (pad_bytes != 0) { *mem_end = '\0'; } for (char *p = mem, *p_next; p != mem_end; p = p_next) { - p_next = memchr(p, '\n', mem_end - p); + p_next = static_cast(memchr(p, '\n', mem_end - p)); if (p_next != NULL) { if (trim_trailing_space) { for (char *p_trim = p_next - 1; p_trim > p && ELEM(*p_trim, ' ', '\t'); p_trim--) { @@ -571,7 +571,7 @@ LinkNode *BLI_file_read_as_lines(const char *filepath) return NULL; } - buf = MEM_mallocN(size, "file_as_lines"); + buf = MEM_cnew_array(size, "file_as_lines"); if (buf) { size_t i, last = 0; diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.cc similarity index 99% rename from source/blender/blenlib/intern/string_utf8.c rename to source/blender/blenlib/intern/string_utf8.cc index 50ce09ea1d7..363f1cea3fa 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.cc @@ -22,7 +22,7 @@ #include "BLI_string.h" /* #BLI_string_debug_size. */ #include "BLI_string_utf8.h" /* own include */ #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" #endif #ifdef __GNUC__ # pragma GCC diagnostic error "-Wsign-conversion" @@ -598,10 +598,10 @@ char32_t BLI_str_utf32_char_to_upper(const char32_t wc) if (wc >= from[0] && wc <= from[ARRAY_SIZE(from) - 2]) { /* Binary search since these are sorted. */ - int min = 0; - int max = ARRAY_SIZE(from) - 2; + size_t min = 0; + size_t max = ARRAY_SIZE(from) - 2; while (max >= min) { - const int mid = (min + max) / 2; + const size_t mid = (min + max) / 2; if (wc > from[mid]) { min = mid + 1; } @@ -704,10 +704,10 @@ char32_t BLI_str_utf32_char_to_lower(const char32_t wc) if (wc >= from[0] && wc <= from[ARRAY_SIZE(from) - 2]) { /* Binary search since these are sorted. */ - int min = 0; - int max = ARRAY_SIZE(from) - 2; + size_t min = 0; + size_t max = ARRAY_SIZE(from) - 2; while (max >= min) { - const int mid = (min + max) / 2; + const size_t mid = (min + max) / 2; if (wc > from[mid]) { min = mid + 1; } diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.cc similarity index 99% rename from source/blender/blenlib/intern/winstuff.c rename to source/blender/blenlib/intern/winstuff.cc index fea31ce5bf1..e89fad7ae89 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.cc @@ -23,8 +23,8 @@ # include "BLI_utildefines.h" # include "BLI_winstuff.h" -# include "utf_winfunc.h" -# include "utfconv.h" +# include "utf_winfunc.hh" +# include "utfconv.hh" /* FILE_MAXDIR + FILE_MAXFILE */ diff --git a/source/blender/blenlib/intern/winstuff_dir.c b/source/blender/blenlib/intern/winstuff_dir.cc similarity index 97% rename from source/blender/blenlib/intern/winstuff_dir.c rename to source/blender/blenlib/intern/winstuff_dir.cc index b687fb544da..f655fff58a6 100644 --- a/source/blender/blenlib/intern/winstuff_dir.c +++ b/source/blender/blenlib/intern/winstuff_dir.cc @@ -23,7 +23,7 @@ # define WIN32_SKIP_HKEY_PROTECTION /* Need to use `HKEY`. */ # include "BLI_utildefines.h" # include "BLI_winstuff.h" -# include "utfconv.h" +# include "utfconv.hh" # define PATH_SUFFIX "\\*" # define PATH_SUFFIX_LEN 2 @@ -58,7 +58,7 @@ DIR *opendir(const char *path) if ((GetFileAttributesW(path_16) & FILE_ATTRIBUTE_DIRECTORY) && ((path_len = strlen(path)) < (sizeof(newd->path) - PATH_SUFFIX_LEN))) { - newd = MEM_mallocN(sizeof(DIR), "opendir"); + newd = static_cast(MEM_mallocN(sizeof(DIR), "opendir")); newd->handle = INVALID_HANDLE_VALUE; memcpy(newd->path, path, path_len); memcpy(newd->path + path_len, PATH_SUFFIX, PATH_SUFFIX_LEN + 1); diff --git a/source/blender/datatoc/CMakeLists.txt b/source/blender/datatoc/CMakeLists.txt index e9d2ce94c18..3abd3601792 100644 --- a/source/blender/datatoc/CMakeLists.txt +++ b/source/blender/datatoc/CMakeLists.txt @@ -28,12 +28,12 @@ if(NOT WITH_HEADLESS) ../../../intern/utfconv ) - # for winstuff_dir.c + # for winstuff_dir.cc add_definitions(-DUSE_STANDALONE) list(APPEND SRC - ../blenlib/intern/winstuff_dir.c - ../../../intern/utfconv/utfconv.c + ../blenlib/intern/winstuff_dir.cc + ../../../intern/utfconv/utfconv.cc ) endif() diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index b99cfc89bbb..fa67a8ff727 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -66,7 +66,7 @@ #include #if defined(WIN32) -# include "utfconv.h" +# include "utfconv.hh" # include #else # include diff --git a/source/blender/imbuf/intern/thumbs.cc b/source/blender/imbuf/intern/thumbs.cc index 5e14f5d817e..f3e7018a18f 100644 --- a/source/blender/imbuf/intern/thumbs.cc +++ b/source/blender/imbuf/intern/thumbs.cc @@ -47,7 +47,7 @@ /* For SHGetSpecialFolderPath, has to be done before BLI_winstuff * because 'near' is disabled through BLI_windstuff */ # include "BLI_winstuff.h" -# include "utfconv.h" +# include "utfconv.hh" # include /* #chdir */ # include #endif diff --git a/source/blender/io/alembic/exporter/abc_archive.cc b/source/blender/io/alembic/exporter/abc_archive.cc index c5fe2bf2d92..c1335b0ef76 100644 --- a/source/blender/io/alembic/exporter/abc_archive.cc +++ b/source/blender/io/alembic/exporter/abc_archive.cc @@ -19,7 +19,7 @@ # include "BLI_path_util.h" # include "BLI_string.h" -# include "utfconv.h" +# include "utfconv.hh" #endif namespace blender::io::alembic { diff --git a/source/blender/io/alembic/intern/abc_reader_archive.cc b/source/blender/io/alembic/intern/abc_reader_archive.cc index 46c74941fa1..d79bdf25a9b 100644 --- a/source/blender/io/alembic/intern/abc_reader_archive.cc +++ b/source/blender/io/alembic/intern/abc_reader_archive.cc @@ -16,7 +16,7 @@ #include "BLI_string.h" #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" #endif #include diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc index 5b23f1aeeee..daa602097c3 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_pdf.cc @@ -30,7 +30,7 @@ #include "ED_view3d.hh" #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" #endif #include "UI_view2d.hh" diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc index 1ef2a83f7de..c9146d26a56 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.cc @@ -30,7 +30,7 @@ #include "ED_view3d.hh" #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" #endif #include "UI_view2d.hh" diff --git a/source/creator/creator.cc b/source/creator/creator.cc index 6b1f8114479..75562a114dc 100644 --- a/source/creator/creator.cc +++ b/source/creator/creator.cc @@ -10,7 +10,7 @@ #include #ifdef WIN32 -# include "utfconv.h" +# include "utfconv.hh" # include #endif