Skip to content

Commit 42e5731

Browse files
committed
update
1 parent 16ba9c8 commit 42e5731

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+615
-722
lines changed

external/sdl2/sdl2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ if (APPLE OR LINUX OR UNIX)
55
endif()
66

77
if(NOT DEFINED SDL2_INCLUDE_DIRS)
8-
set(SDL2_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/external/sdl2/include")
8+
set(SDL2_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include")
99
endif()
1010

libs/amDebugger/src/amDebugger/vm/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class MemBank {
8585
public:
8686

8787
bool isValid() const {
88-
return c_def(this) && m_size != 0;
88+
return qd::c_def(this) && m_size != 0;
8989
}
9090

9191
qtd::span<uint8_t> getSpan() const {

libs/qd/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ target_link_libraries(qd PRIVATE imgui EASTL ${SDL2_LIBRARIES})
5151

5252
# Compiler options
5353
if (MSVC)
54-
target_compile_options(qd PRIVATE /W4 /permissive- /Zc:__cplusplus)
54+
#target_compile_options(qd PRIVATE /W4 /permissive- /Zc:__cplusplus)
55+
56+
target_compile_options(qd PRIVATE /W4 /WX /bigobj /ZI)
57+
target_link_options(qd PRIVATE /INCREMENTAL /SAFESEH:NO)
58+
target_compile_options(qd PRIVATE /MP) # multiprocessor build
59+
5560
endif()
5661

5762
# Append content from the original va_stdafx.h file to the generated file

libs/qd/app/appPartsMgr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void AppPartsManager::sendAppEventMsg(qd::appMsg::BaseMsg& in_msg)
2626
}
2727

2828

29-
qd::ApplicationPart* AppPartsManager::findPartByName(const qd::string& strPartID) const
29+
qd::ApplicationPart* AppPartsManager::findPartByName(const qtd::string& strPartID) const
3030
{
3131
for (auto it = m_pParts.begin(); it != m_pParts.end(); ++it)
3232
{
@@ -57,7 +57,7 @@ bool AppPartsManager::addPartTry(ref_ptr<ApplicationPart> pPart)
5757
if (!pPart)
5858
return false;
5959

60-
const qd::string& strPartName = pPart->getPartName();
60+
const qtd::string& strPartName = pPart->getPartName();
6161
assert(!strPartName.empty());
6262

6363
if (qd::is_has(pPart, m_pParts))
@@ -79,7 +79,7 @@ void AppPartsManager::addPart(ref_ptr<ApplicationPart> pPart)
7979
if (!pPart)
8080
return;
8181

82-
const qd::string& strPartName = pPart->getPartName();
82+
const qtd::string& strPartName = pPart->getPartName();
8383
if (strPartName.empty())
8484
pPart->setPartName(pPart->getTypeInfo().getTypeName());
8585

@@ -90,7 +90,7 @@ void AppPartsManager::addPart(ref_ptr<ApplicationPart> pPart)
9090
}
9191

9292

93-
void AppPartsManager::addPart(ref_ptr<ApplicationPart> p_part, const qd::string& part_name_id)
93+
void AppPartsManager::addPart(ref_ptr<ApplicationPart> p_part, const qtd::string& part_name_id)
9494
{
9595
p_part->setPartName(part_name_id);
9696
addPart(p_part);

libs/qd/app/appPartsMgr.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AppPartsManager : public qd::IModuleInterface
7575

7676
// TPartClass base of ApplicationPart*
7777
template<class TAppPartClass, typename ...TArgs>
78-
inline TAppPartClass* createPart_(qd::string name, TArgs&&... args)
78+
inline TAppPartClass* createPart_(qtd::string name, TArgs&&... args)
7979
{
8080
qd::ApplicationPart::OnCreate_t prm;
8181
prm.name = name;
@@ -89,13 +89,13 @@ class AppPartsManager : public qd::IModuleInterface
8989
return pNewInst;
9090
}
9191

92-
ApplicationPart* findPartByName(const qd::string& strPartID) const;
92+
ApplicationPart* findPartByName(const qtd::string& strPartID) const;
9393

9494

9595
int findPartIndex(ApplicationPart* pPart) const;
9696
bool addPartTry(ref_ptr<ApplicationPart> pPart);
9797
void addPart(ref_ptr<ApplicationPart> p_part);
98-
void addPart(ref_ptr<ApplicationPart> p_part, const qd::string& part_name_id);
98+
void addPart(ref_ptr<ApplicationPart> p_part, const qtd::string& part_name_id);
9999

100100
void destroyPart(ref_ptr<ApplicationPart> pPart);
101101
void destroy();

libs/qd/app/applicationPart.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void ApplicationPart::onPartCreate(ApplicationPart::OnCreate_t& prm)
1717
{
1818
m_pApp = prm.app;
1919

20-
qd::string name = prm.name;
20+
qtd::string name = prm.name;
2121
if (name.empty() && prm.typeInfo)
2222
{
2323
}

libs/qd/app/applicationPart.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ApplicationPart : public qd::Node
4040

4141

4242
protected:
43-
qd::string m_PartName;
43+
qtd::string m_PartName;
4444
EAppPartMtd m_Methods;
4545
float m_ZOrder = 0; // qd.AppParts.EBaseZOrder
4646
qd::Application* m_pApp = nullptr;
@@ -54,7 +54,7 @@ class ApplicationPart : public qd::Node
5454
virtual ~ApplicationPart() override;
5555

5656
struct OnCreate_t {
57-
qd::string name;
57+
qtd::string name;
5858
const qd::TypeInfo* typeInfo = nullptr;
5959
qd::Application* app = nullptr;
6060
};
@@ -97,8 +97,8 @@ class ApplicationPart : public qd::Node
9797

9898
void setZOrder(const float& zOrder);
9999

100-
const qd::string& getPartName() const { return m_PartName; }
101-
void setPartName(const qd::string& PartName)
100+
const qtd::string& getPartName() const { return m_PartName; }
101+
void setPartName(const qtd::string& PartName)
102102
{
103103
assert(!PartName.empty());
104104
m_PartName = PartName;

libs/qd/app/moduleManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ qd::IModuleInterface* ModuleManager::getOrCreateModule(const qd::TypeInfo& Modul
157157
qd::ModuleManager* ModuleManager::I() {
158158
// PHOENIX SINGLETON
159159
if (!TThis::m_pSingleInstance && !TThis::m_bSingleDestroyed) {
160-
// qd::String::gInitStaticData(); // First create qd::string(W) + Destroy Singleton
160+
// qd::String::gInitStaticData(); // First create qtd::string(W) + Destroy Singleton
161161
m_pSingleInstance = new TThis();
162162
::atexit(&TThis::_destroySingleton);
163163
m_bSingleDestroyed = false;

libs/qd/app/moduleManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ModuleInfo
3131
eastl::fixed_function<8, IModuleInterface*(const qd::ModuleCreateParams&)> m_CreateFunc;
3232
typedef eastl::fixed_function<8, IModuleInterface*(const qd::ModuleCreateParams&)> TCreateFunc;
3333
uint32_t m_nInstanceRef;
34-
qd::string m_ModuleName;
34+
qtd::string m_ModuleName;
3535

3636
public:
3737
ModuleInfo(const qd::TypeInfo& pModuleInfo)

libs/qd/base/base.h

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#pragma once
2+
#include <cstdint>
23
#include <EABase/eabase.h>
34
#include <EASTL/internal/config.h>
4-
#include <cstdint>
55

66
using THash32 = uint32_t;
77

88
// clang-format off
99

1010
#define SIDENT(x) x
11-
#define STRINGIFY(x) _STRINGIFY2(x) /* #x */
12-
#define _STRINGIFY2(x) #x
11+
#ifndef STRINGIFY
12+
# define STRINGIFY(x) _STRINGIFY2(x) /* #x */
13+
# define _STRINGIFY2(x) #x
14+
#endif
1315
#define CON(a, b) a##b
1416
#define PASTE(a, b) CON(a, b)
1517

@@ -34,26 +36,27 @@ using THash32 = uint32_t;
3436
// dummy place to set breakpoint if needed
3537
#define BPT() [](){return 0;}();
3638

37-
template<typename T> T c_def(T v) { return v; }
38-
template<typename T> constexpr inline T c_expr(T value) { return value; }
39+
#define MAKE4C(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
40+
#define _MAKE4C(s) MAKE4C(s[0], s[1], s[2], s[3])
3941

4042

41-
EA_DISABLE_VC_WARNING(4100) // unreferenced formal parameter
42-
template<typename... T> inline void unused(T&&... x) { (void(sizeof...(x))); }
43-
#define G_UNUSED(...) unused(__VA_ARGS__)
44-
EA_RESTORE_VC_WARNING()
43+
namespace qd {
4544

45+
static constexpr uint32_t _noPos = UINT32_MAX; // ~0u
4646

47-
#define MAKE4C(a, b, c, d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
48-
#define _MAKE4C(s) MAKE4C(s[0], s[1], s[2], s[3])
47+
inline constexpr uint32_t fourcc(const char s[4]) {
48+
return MAKE4C(s[0], s[1], s[2], s[3]);
49+
}
50+
51+
template<typename T> T c_def(T v) { return v; }
52+
template<typename T> constexpr inline T c_expr(T value) { return value; }
4953

5054

51-
namespace qd {
52-
static constexpr uint32_t _noPos = UINT32_MAX; // ~0u
55+
EA_DISABLE_VC_WARNING(4100) // unreferenced formal parameter
56+
template<typename... T> inline void unused(T&&... x) { (void(sizeof...(x))); }
57+
#define G_UNUSED(...) qd::unused(__VA_ARGS__)
58+
EA_RESTORE_VC_WARNING()
5359

54-
inline constexpr uint32_t fourcc(const char s[4]) {
55-
return MAKE4C(s[0], s[1], s[2], s[3]);
56-
}
5760
}; // namespace qd
5861

5962

0 commit comments

Comments
 (0)