mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 12:42:34 +01:00
Cleanup.
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
|
||||
#include <bx/bx.h>
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4312); // warning C4312 : 'reinterpret_cast' : conversion from 'int' to 'const char *' of greater size
|
||||
#include <catch/catch.hpp>
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
#define TEST(_x) TEST_CASE(#_x, "")
|
||||
#define CHECK_EQUAL(_x, _y) REQUIRE(_x == _y)
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
# define _strdup strdup
|
||||
#endif // !BX_COMPILER_MSVC
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4996) // warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details.
|
||||
|
||||
struct complex {
|
||||
complex() {data = 0;}
|
||||
complex(const char* s) { data = strdup(s); }
|
||||
|
||||
@@ -145,12 +145,12 @@ int main(int _argc, const char* _argv[])
|
||||
}
|
||||
|
||||
void* data = NULL;
|
||||
size_t size = 0;
|
||||
uint32_t size = 0;
|
||||
|
||||
bx::CrtFileReader fr;
|
||||
if (bx::open(&fr, filePath) )
|
||||
{
|
||||
size = (size_t)bx::getSize(&fr);
|
||||
size = uint32_t(bx::getSize(&fr) );
|
||||
data = malloc(size);
|
||||
bx::read(&fr, data, size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user