Skip to content

Commit 1136c15

Browse files
Remove UTF submodules
1 parent 33a9d65 commit 1136c15

File tree

8 files changed

+14
-40
lines changed

8 files changed

+14
-40
lines changed

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@
2020
[submodule "3rdparty/zlib"]
2121
path = 3rdparty/zlib
2222
url = https://github.com/madler/zlib.git
23-
[submodule "3rdparty/utfcpp"]
24-
path = 3rdparty/utfcpp
25-
url = https://github.com/nemtrif/utfcpp.git
26-
[submodule "3rdparty/convertutf"]
27-
path = 3rdparty/convertutf
28-
url = https://github.com/plenluno/convertutf.git
2923
[submodule "3rdparty/libpng"]
3024
path = 3rdparty/libpng
3125
url = https://github.com/glennrp/libpng.git

3rdparty/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ if(NBL_UPDATE_GIT_SUBMODULE)
1818
update_git_submodule(./nbl_spirv_cross)
1919
update_git_submodule(./zlib)
2020
update_git_submodule(./openexr)
21-
update_git_submodule(./utfcpp) # TODO: remove
22-
update_git_submodule(./convertutf) # TODO: remove
2321
update_git_submodule(./libpng)
2422
update_git_submodule(./openssl)
2523
update_git_submodule(./libjpeg-turbo)
@@ -269,12 +267,6 @@ add_library(spirv_cross OBJECT
269267
target_compile_definitions(spirv_cross PUBLIC SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS)
270268

271269

272-
# TODO: remove
273-
add_library(convert_utf OBJECT
274-
convertutf/ConvertUTF.cpp
275-
)
276-
277-
278270
add_library(aesGladman OBJECT
279271
aesGladman/aes_ni.c
280272
aesGladman/aescrypt.c
@@ -350,7 +342,6 @@ set(NBL_3RDPARTY_TARGETS
350342
shaderc_util
351343
shaderc
352344
jpeg-static
353-
convert_utf
354345
bzip2
355346
glslang
356347
OGLCompiler

3rdparty/convertutf

Lines changed: 0 additions & 1 deletion
This file was deleted.

3rdparty/utfcpp

Lines changed: 0 additions & 1 deletion
This file was deleted.

include/nbl/system/CStdoutLogger.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66

77
namespace nbl::system
88
{
9-
class CStdoutLogger : public IThreadsafeLogger
10-
{
9+
10+
class CStdoutLogger : public IThreadsafeLogger
11+
{
12+
public:
1113
CStdoutLogger(core::bitflag<E_LOG_LEVEL> logLevelMask = ILogger::defaultLogMask()) : IThreadsafeLogger(logLevelMask) {}
14+
15+
protected:
1216
virtual void threadsafeLog_impl(const std::string_view& fmt, E_LOG_LEVEL logLevel, va_list args) override
1317
{
1418
printf(constructLogString(fmt, logLevel, args).data());
1519
fflush(stdout);
1620
}
1721

18-
};
22+
};
23+
1924
}
2025

2126
#endif

include/nbl/system/CSystemWin32.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifndef _NBL_SYSTEM_CSYSTEMWIN32_H_INCLUDED_
22
#define _NBL_SYSTEM_CSYSTEMWIN32_H_INCLUDED_
3+
34
#ifdef _NBL_PLATFORM_WINDOWS_
45
#include <windows.h>
56
#include <powerbase.h>

include/nbl/system/ILogger.h

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <iomanip>
1414
#include <regex>
1515
#include <cstdarg>
16-
#include <codecvt>
1716

1817

1918
namespace nbl::system
@@ -31,10 +30,6 @@ class ILogger : public core::IReferenceCounted
3130
ELL_PERFORMANCE = 8,
3231
ELL_ERROR = 16
3332
};
34-
protected:
35-
static core::bitflag<E_LOG_LEVEL> defaultLogMask();
36-
public:
37-
ILogger(core::bitflag<E_LOG_LEVEL> logLevelMask) : m_logLevelMask(logLevelMask) {}
3833

3934
void log(const std::string_view& fmtString, E_LOG_LEVEL logLevel = ELL_DEBUG, ...)
4035
{
@@ -53,6 +48,10 @@ class ILogger : public core::IReferenceCounted
5348
}
5449

5550
protected:
51+
static core::bitflag<E_LOG_LEVEL> defaultLogMask();
52+
53+
ILogger(core::bitflag<E_LOG_LEVEL> logLevelMask) : m_logLevelMask(logLevelMask) {}
54+
5655
virtual void log_impl(const std::string_view& fmtString, E_LOG_LEVEL logLevel, va_list args) = 0;
5756
virtual std::string constructLogString(const std::string_view& fmtString, E_LOG_LEVEL logLevel, va_list l)
5857
{
@@ -106,14 +105,7 @@ class ILogger : public core::IReferenceCounted
106105
return out_str;
107106
return "";
108107
}
109-
virtual std::wstring constructLogWstring(const std::wstring_view& fmtString, E_LOG_LEVEL logLevel, va_list l)
110-
{
111-
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
112-
std::string narrow = converter.to_bytes(std::wstring(fmtString));
113-
std::string narrowStr = constructLogString(narrow, logLevel, l);
114-
std::wstring wide = converter.from_bytes(narrowStr);
115-
return wide;
116-
}
108+
117109
private:
118110
core::bitflag<E_LOG_LEVEL> m_logLevelMask;
119111
};

src/nbl/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,6 @@ if (NBL_EMBED_BUILTIN_RESOURCES)
376376
endif()
377377

378378
set(COMMON_INCLUDE_DIRS
379-
${THIRD_PARTY_SOURCE_DIR}/convertutf # TODO: remove
380-
${THIRD_PARTY_SOURCE_DIR}/utfcpp/source # TODO: remove
381379
${THIRD_PARTY_SOURCE_DIR}/glm
382380
${THIRD_PARTY_SOURCE_DIR}/renderdoc # for renderdoc api header
383381
${CMAKE_BINARY_DIR}/3rdparty/zlib #for dynamically generated zconf.h
@@ -387,10 +385,6 @@ set(COMMON_INCLUDE_DIRS
387385
$<TARGET_PROPERTY:jpeg-static,BINARY_DIR> #for dynamically generated jconfig.h
388386
)
389387

390-
macro(nbl_target_link_utfcpp _trgt) # TODO: remove
391-
target_include_directories(${_trgt} PUBLIC ${THIRD_PARTY_SOURCE_DIR}/utfcpp/source)
392-
endmacro()
393-
394388
# TODO: Change all MACROS into FUNCTIONS (if possible, need to clarify variable scoping rules)
395389
macro(nbl_target_link_zlib _trgt)
396390
add_dependencies(zlibstatic zlib_copy)
@@ -505,7 +499,6 @@ add_library(Nabla STATIC
505499
${NABLA_HEADERS}
506500
$<TARGET_OBJECTS:aesGladman>
507501
$<TARGET_OBJECTS:bzip2>
508-
$<TARGET_OBJECTS:convert_utf>
509502
$<TARGET_OBJECTS:lz4>
510503
$<TARGET_OBJECTS:lzma>
511504
$<TARGET_OBJECTS:spirv_cross>

0 commit comments

Comments
 (0)