mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added kExitSuccess/Failure constants.
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
|
||||
namespace bx
|
||||
{
|
||||
const int32_t kExitSuccess = 0;
|
||||
const int32_t kExitFailure = 1;
|
||||
|
||||
/// Template for avoiding MSVC: C4127: conditional expression is constant
|
||||
template<bool>
|
||||
bool isEnabled();
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace bx
|
||||
: m_fn(NULL)
|
||||
, m_userData(NULL)
|
||||
, m_stackSize(0)
|
||||
, m_exitCode(0 /*EXIT_SUCCESS*/)
|
||||
, m_exitCode(kExitSuccess)
|
||||
, m_running(false)
|
||||
{
|
||||
BX_STATIC_ASSERT(sizeof(ThreadInternal) <= sizeof(m_internal) );
|
||||
|
||||
@@ -106,5 +106,5 @@ int main()
|
||||
extern void simd_bench();
|
||||
simd_bench();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return bx::kExitSuccess;
|
||||
}
|
||||
|
||||
@@ -123,21 +123,21 @@ int main(int _argc, const char* _argv[])
|
||||
if (cmdLine.hasArg('h', "help") )
|
||||
{
|
||||
help();
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* filePath = cmdLine.findOption('f');
|
||||
if (NULL == filePath)
|
||||
{
|
||||
help("Input file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* outFilePath = cmdLine.findOption('o');
|
||||
if (NULL == outFilePath)
|
||||
{
|
||||
help("Output file name must be specified.");
|
||||
return EXIT_FAILURE;
|
||||
return bx::kExitFailure;
|
||||
}
|
||||
|
||||
const char* name = cmdLine.findOption('n');
|
||||
|
||||
Reference in New Issue
Block a user