mirror of https://github.com/stella-emu/stella.git
Last commit for bspf.hxx; cleaned up the formatting.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@3305 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
8dbd545433
commit
c0095ca59a
|
@ -29,16 +29,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
// Types for 8-bit signed and unsigned integers
|
// Types for 8/16/32/64-bit signed and unsigned integers
|
||||||
using Int8 = int8_t;
|
using Int8 = int8_t;
|
||||||
using uInt8 = uint8_t;
|
using uInt8 = uint8_t;
|
||||||
// Types for 16-bit signed and unsigned integers
|
|
||||||
using Int16 = int16_t;
|
using Int16 = int16_t;
|
||||||
using uInt16 = uint16_t;
|
using uInt16 = uint16_t;
|
||||||
// Types for 32-bit signed and unsigned integers
|
|
||||||
using Int32 = int32_t;
|
using Int32 = int32_t;
|
||||||
using uInt32 = uint32_t;
|
using uInt32 = uint32_t;
|
||||||
// Types for 64-bit signed and unsigned integers
|
|
||||||
using Int64 = int64_t;
|
using Int64 = int64_t;
|
||||||
using uInt64 = uint64_t;
|
using uInt64 = uint64_t;
|
||||||
|
|
||||||
|
@ -93,9 +90,12 @@ namespace BSPF
|
||||||
static const string ARCH = "NOARCH";
|
static const string ARCH = "NOARCH";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
// Combines 'max' and 'min', and clamps value to the upper/lower value
|
||||||
// Some convenience functions
|
// if it is outside the specified range
|
||||||
template<typename T> inline T clamp(T a, T l, T u) { return (a<l) ? l : (a>u) ? u : a; }
|
template<typename T> inline T clamp(T a, T l, T u)
|
||||||
|
{
|
||||||
|
return (a<l) ? l : (a>u) ? u : a;
|
||||||
|
}
|
||||||
|
|
||||||
// Compare two strings, ignoring case
|
// Compare two strings, ignoring case
|
||||||
inline int compareIgnoreCase(const string& s1, const string& s2)
|
inline int compareIgnoreCase(const string& s1, const string& s2)
|
||||||
|
@ -166,7 +166,6 @@ inline bool containsIgnoreCase(const string& s1, const string& s2)
|
||||||
{
|
{
|
||||||
return findIgnoreCase(s1, s2) != string::npos;
|
return findIgnoreCase(s1, s2) != string::npos;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace BSPF
|
} // namespace BSPF
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue