diff --git a/examples/06-bump/bump.cpp b/examples/06-bump/bump.cpp index 9128f27c..f694aabc 100644 --- a/examples/06-bump/bump.cpp +++ b/examples/06-bump/bump.cpp @@ -6,7 +6,6 @@ #include "common.h" #include -#include #include #include "entry.h" #include "dbg.h" @@ -305,7 +304,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) const bgfx::Memory* mem; - calcTangents(s_cubeVertices, countof(s_cubeVertices), s_PosNormalTangentTexcoordDecl, s_cubeIndices, countof(s_cubeIndices) ); + calcTangents(s_cubeVertices, BX_COUNTOF(s_cubeVertices), s_PosNormalTangentTexcoordDecl, s_cubeIndices, BX_COUNTOF(s_cubeIndices) ); // Create static vertex buffer. mem = bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) ); diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp index 7f4a5fab..82c47649 100644 --- a/examples/09-hdr/hdr.cpp +++ b/examples/09-hdr/hdr.cpp @@ -6,7 +6,6 @@ #include "common.h" #include -#include #include #include #include "entry.h" diff --git a/examples/10-font/font.cpp b/examples/10-font/font.cpp index aff89443..26652c2c 100644 --- a/examples/10-font/font.cpp +++ b/examples/10-font/font.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include "entry.h" #include "dbg.h" @@ -100,7 +99,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) "font/five_minutes.otf" }; - const uint32_t fontCount = countof(fontNames); + const uint32_t fontCount = BX_COUNTOF(fontNames); TrueTypeHandle fontFiles[fontCount]; FontHandle fonts[fontCount]; @@ -189,7 +188,7 @@ int _main_(int /*_argc*/, char** /*_argv*/) // Use transient text to display debug information. wchar_t fpsText[64]; - bx::swnprintf(fpsText, countof(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs); + bx::swnprintf(fpsText, BX_COUNTOF(fpsText), L"Frame: % 7.3f[ms]", double(frameTime) * toMs); textBufferManager->clearTextBuffer(transientText); textBufferManager->setPenPosition(transientText, 20.0, 4.0f); diff --git a/tools/geometryc/geometryc.cpp b/tools/geometryc/geometryc.cpp index 4e260a27..7777c1b3 100644 --- a/tools/geometryc/geometryc.cpp +++ b/tools/geometryc/geometryc.cpp @@ -51,7 +51,6 @@ namespace std { namespace tr1 {} using namespace tr1; } // namespace std #include #include -#include #include #include #include @@ -429,7 +428,7 @@ int main(int _argc, const char* _argv[]) const char* next = data; do { - next = tokenizeCommandLine(next, commandLine, len, argc, argv, countof(argv), '\n'); + next = tokenizeCommandLine(next, commandLine, len, argc, argv, BX_COUNTOF(argv), '\n'); if (0 < argc) { if (0 == strcmp(argv[0], "#") ) diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index a0c29351..fa1a297f 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -36,7 +36,6 @@ extern "C" #include #include -#include #include #include #include @@ -568,7 +567,7 @@ bool compileHLSLShaderDx9(bx::CommandLine& _cmdLine, const std::string& _code, b uint32_t optimization = 3; if (_cmdLine.hasArg(optimization, 'O') ) { - optimization = bx::uint32_min(optimization, countof(s_optimizationLevelDx9)-1); + optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelDx9)-1); flags |= s_optimizationLevelDx9[optimization]; } else @@ -749,7 +748,7 @@ bool compileHLSLShaderDx11(bx::CommandLine& _cmdLine, const std::string& _code, uint32_t optimization = 3; if (_cmdLine.hasArg(optimization, 'O') ) { - optimization = bx::uint32_min(optimization, countof(s_optimizationLevelDx11)-1); + optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelDx11)-1); flags |= s_optimizationLevelDx11[optimization]; } else @@ -1051,7 +1050,7 @@ struct Preprocessor void setDefaultDefine(const char* _name) { char temp[1024]; - bx::snprintf(temp, countof(temp) + bx::snprintf(temp, BX_COUNTOF(temp) , "#ifndef %s\n" "# define %s 0\n" "#endif // %s\n"