mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Cleanup.
This commit is contained in:
35
include/bx/bx.inl
Normal file
35
include/bx/bx.inl
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2010-2017 Branimir Karadzic. All rights reserved.
|
||||
* License: https://github.com/bkaradzic/bx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#ifndef BX_H_HEADER_GUARD
|
||||
# error "Must be included from bx/bx.h!"
|
||||
#endif // BX_H_HEADER_GUARD
|
||||
|
||||
namespace bx
|
||||
{
|
||||
template<bool>
|
||||
inline bool isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
template<>
|
||||
inline bool isEnabled<false>()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool ignoreC4127(bool _x)
|
||||
{
|
||||
return _x;
|
||||
}
|
||||
|
||||
template<typename Ty>
|
||||
inline void xchg(Ty& _a, Ty& _b)
|
||||
{
|
||||
Ty tmp = _a; _a = _b; _b = tmp;
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
Reference in New Issue
Block a user