Skip to content

Commit 43bee94

Browse files
committed
Deleted few macros
1 parent bd1c14d commit 43bee94

File tree

5 files changed

+36
-64
lines changed

5 files changed

+36
-64
lines changed

include/ESceneNodeTypes.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,45 @@ namespace scene
2020
enum ESCENE_NODE_TYPE
2121
{
2222
//! of type CSceneManager (note that ISceneManager is not(!) an ISceneNode)
23-
ESNT_SCENE_MANAGER = MAKE_NBL_ID('s','m','n','g'),
23+
ESNT_SCENE_MANAGER,
2424

2525
//! Sky Box Scene Node
26-
ESNT_SKY_BOX = MAKE_NBL_ID('s','k','y','_'),
26+
ESNT_SKY_BOX,
2727

2828
//! Sky Dome Scene Node
29-
ESNT_SKY_DOME = MAKE_NBL_ID('s','k','y','d'),
29+
ESNT_SKY_DOME,
3030

3131
//! Mesh Scene Node
32-
ESNT_MESH = MAKE_NBL_ID('m','e','s','h'),
33-
ESNT_MESH_INSTANCED = MAKE_NBL_ID('m','b','f','I'),
32+
ESNT_MESH,
33+
ESNT_MESH_INSTANCED,
3434

3535
//! Dummy Transformation Scene Node
36-
ESNT_DUMMY_TRANSFORMATION = MAKE_NBL_ID('d','m','m','y'),
36+
ESNT_DUMMY_TRANSFORMATION,
3737

3838
//! Camera Scene Node
39-
ESNT_CAMERA = MAKE_NBL_ID('c','a','m','_'),
39+
ESNT_CAMERA,
4040

4141
//! Animated Mesh Scene Node
42-
ESNT_ANIMATED_MESH = MAKE_NBL_ID('a','m','s','h'),
43-
ESNT_ANIMATED_MESH_INSTANCED = MAKE_NBL_ID('a','m','s','I'),
42+
ESNT_ANIMATED_MESH,
43+
ESNT_ANIMATED_MESH_INSTANCED,
4444

4545
//! Skinned Mesh Scene Node
46-
ESNT_SKINNED_MESH = MAKE_NBL_ID('s','m','s','h'),
47-
ESNT_SKINNED_MESH_INSTANCED = MAKE_NBL_ID('s','m','s','I'),
46+
ESNT_SKINNED_MESH,
47+
ESNT_SKINNED_MESH_INSTANCED,
4848

4949
//! Maya Camera Scene Node
5050
/** Legacy, for loading version <= 1.4.x .irr files */
51-
ESNT_CAMERA_MAYA = MAKE_NBL_ID('c','a','m','M'),
51+
ESNT_CAMERA_MAYA,
5252

5353
//! First Person Shooter Camera
5454
/** Legacy, for loading version <= 1.4.x .irr files */
55-
ESNT_CAMERA_FPS = MAKE_NBL_ID('c','a','m','F'),
55+
ESNT_CAMERA_FPS,
5656

5757
//! Unknown scene node
58-
ESNT_UNKNOWN = MAKE_NBL_ID('u','n','k','n'),
58+
ESNT_UNKNOWN,
5959

6060
//! Will match with any scene node when checking types
61-
ESNT_ANY = MAKE_NBL_ID('a','n','y','_')
61+
ESNT_ANY
6262
};
6363

6464

include/IFileArchive.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ enum EFileSystemType
2626
enum E_FILE_ARCHIVE_TYPE
2727
{
2828
//! A PKZIP archive
29-
EFAT_ZIP = MAKE_NBL_ID('Z','I','P', 0),
29+
EFAT_ZIP,
3030

3131
//! A gzip archive
32-
EFAT_GZIP = MAKE_NBL_ID('g','z','i','p'),
32+
EFAT_GZIP,
3333

3434
//! A virtual directory
35-
EFAT_FOLDER = MAKE_NBL_ID('f','l','d','r'),
35+
EFAT_FOLDER,
3636

3737
//! An ID Software PAK archive
38-
EFAT_PAK = MAKE_NBL_ID('P','A','K', 0),
38+
EFAT_PAK,
3939

4040
//! A Tape ARchive
41-
EFAT_TAR = MAKE_NBL_ID('T','A','R', 0),
41+
EFAT_TAR,
4242

4343
//! The type of this archive is unknown
44-
EFAT_UNKNOWN = MAKE_NBL_ID('u','n','k','n')
44+
EFAT_UNKNOWN
4545
};
4646

4747
//! The FileArchive manages archives and provides access to files inside them.

include/IFileSystem.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class IFileSystem : public virtual core::IReferenceCounted
329329
{
330330
subdir = directory.subString(lastpos, pos - lastpos + 1);
331331

332-
if (subdir == _NBL_TEXT("../"))
332+
if (subdir == "../")
333333
{
334334
if (lastWasRealDir)
335335
{
@@ -342,11 +342,11 @@ class IFileSystem : public virtual core::IReferenceCounted
342342
lastWasRealDir = false;
343343
}
344344
}
345-
else if (subdir == _NBL_TEXT("/"))
345+
else if (subdir == "/")
346346
{
347347
dir = root;
348348
}
349-
else if (subdir != _NBL_TEXT("./"))
349+
else if (subdir != "./")
350350
{
351351
dir.append(subdir);
352352
lastWasRealDir = true;

include/nbl/core/Types.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,6 @@ typedef std::mutex fast_mutex;
104104

105105
#endif // _NBL_WINDOWS_API_
106106

107-
108-
109-
#define _NBL_TEXT(X) X
110-
111-
112-
113-
114107
// memory debugging
115108
#if defined(_NBL_DEBUG) && defined(NABLA_EXPORTS) && defined(_MSC_VER) && \
116109
(_MSC_VER > 1299) && !defined(_NBL_DONT_DO_MEMORY_DEBUGGING_HERE) && !defined(_WIN32_WCE)
@@ -123,26 +116,5 @@ typedef std::mutex fast_mutex;
123116
#define new DEBUG_CLIENTBLOCK
124117
#endif
125118

126-
127-
//! ignore VC8 warning deprecated
128-
/** The microsoft compiler */
129-
#if defined(_NBL_WINDOWS_API_) && defined(_MSC_VER) && (_MSC_VER >= 1400)
130-
//#pragma warning( disable: 4996)
131-
//#define _CRT_SECURE_NO_DEPRECATE 1
132-
//#define _CRT_NONSTDC_NO_DEPRECATE 1
133-
#endif
134-
135-
136-
//! creates four CC codes used in Irrlicht for simple ids
137-
/** some compilers can create those by directly writing the
138-
code like 'code', but some generate warnings so we use this macro here */
139-
#define MAKE_NBL_ID(c0, c1, c2, c3) \
140-
((uint32_t)(uint8_t)(c0) | ((uint32_t)(uint8_t)(c1) << 8) | \
141-
((uint32_t)(uint8_t)(c2) << 16) | ((uint32_t)(uint8_t)(c3) << 24 ))
142-
143-
#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
144-
#define _strcmpi(a,b) strcmpi(a,b)
145-
#endif
146-
147119
#endif
148120

source/Nabla/CFileSystem.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ bool CFileSystem::changeArchivePassword(const path& filename,
313313
// We need to check for directory names with trailing slash and without
314314
const path absPath = getAbsolutePath(filename);
315315
const path arcPath = FileArchives[idx]->getFileList()->getPath();
316-
if ((absPath == arcPath) || ((absPath+_NBL_TEXT("/")) == arcPath))
316+
if ((absPath == arcPath) || ((absPath+"/") == arcPath))
317317
{
318318
if (password.size())
319319
FileArchives[idx]->Password=password;
@@ -553,7 +553,7 @@ bool CFileSystem::changeWorkingDirectoryTo(const io::path& newDirectory)
553553
{
554554
WorkingDirectory[FILESYSTEM_VIRTUAL] = newDirectory;
555555
// is this empty string constant really intended?
556-
WorkingDirectory[FILESYSTEM_VIRTUAL] = flattenFilename(WorkingDirectory[FILESYSTEM_VIRTUAL], _NBL_TEXT(""));
556+
WorkingDirectory[FILESYSTEM_VIRTUAL] = flattenFilename(WorkingDirectory[FILESYSTEM_VIRTUAL], "");
557557
success = true;
558558
}
559559
else
@@ -660,8 +660,8 @@ path CFileSystem::getRelativeFilename(const path& filename, const path& director
660660
core::splitFilename(getAbsolutePath(filename), &path1, &file, &ext);
661661
io::path path2(getAbsolutePath(directory));
662662
core::list<io::path> list1, list2;
663-
path1.split(list1, _NBL_TEXT("/\\"), 2);
664-
path2.split(list2, _NBL_TEXT("/\\"), 2);
663+
path1.split(list1, "/\\", 2);
664+
path2.split(list2, "/\\", 2);
665665
uint32_t i=0;
666666
core::list<io::path>::const_iterator it1,it2;
667667
it1=list1.begin();
@@ -674,9 +674,9 @@ path CFileSystem::getRelativeFilename(const path& filename, const path& director
674674
prefix1 = *it1;
675675
if ( it2 != list2.end() )
676676
prefix2 = *it2;
677-
if ( prefix1.size() > 1 && prefix1[1] == _NBL_TEXT(':') )
677+
if ( prefix1.size() > 1 && prefix1[1] == ':' )
678678
partition1 = core::locale_lower(prefix1[0]);
679-
if ( prefix2.size() > 1 && prefix2[1] == _NBL_TEXT(':') )
679+
if ( prefix2.size() > 1 && prefix2[1] == ':' )
680680
partition2 = core::locale_lower(prefix2[0]);
681681

682682
// must have the same prefix or we can't resolve it to a relative filename
@@ -698,18 +698,18 @@ path CFileSystem::getRelativeFilename(const path& filename, const path& director
698698
++it1;
699699
++it2;
700700
}
701-
path1=_NBL_TEXT("");
701+
path1="";
702702
for (; i<list2.size(); ++i)
703-
path1 += _NBL_TEXT("../");
703+
path1 += "../";
704704
while (it1 != list1.end())
705705
{
706706
path1.append(*it1++);
707-
path1.append(_NBL_TEXT('/'));
707+
path1.append('/');
708708
}
709709
path1 += file;
710710
if (ext.size())
711711
{
712-
path1.append(_NBL_TEXT('.'));
712+
path1.append('.');
713713
path1 += ext;
714714
}
715715
return path1;
@@ -824,10 +824,10 @@ IFileList* CFileSystem::createFileList()
824824
SFileListEntry e3;
825825

826826
//! PWD
827-
r->addItem(Path + _NBL_TEXT("."), 0, 0, true, 0);
827+
r->addItem(Path + ".", 0, 0, true, 0);
828828

829829
//! parent
830-
r->addItem(Path + _NBL_TEXT(".."), 0, 0, true, 0);
830+
r->addItem(Path + "..", 0, 0, true, 0);
831831

832832
//! merge archives
833833
for (uint32_t i=0; i < FileArchives.size(); ++i)

0 commit comments

Comments
 (0)