mirror of https://github.com/PCSX2/pcsx2.git
Mark static functions in headers as static inline:
This quiets unused function warnings (-Wunused-function) which is on by default on Xcode.
This commit is contained in:
parent
cae8e6ae79
commit
9b7e87c043
|
@ -192,20 +192,20 @@ namespace StringUtil
|
||||||
std::vector<std::string> splitOnNewLine(const std::string& str);
|
std::vector<std::string> splitOnNewLine(const std::string& str);
|
||||||
|
|
||||||
/// Converts a wxString to a UTF-8 std::string.
|
/// Converts a wxString to a UTF-8 std::string.
|
||||||
static std::string wxStringToUTF8String(const wxString& str)
|
static inline std::string wxStringToUTF8String(const wxString& str)
|
||||||
{
|
{
|
||||||
const wxScopedCharBuffer buf(str.ToUTF8());
|
const wxScopedCharBuffer buf(str.ToUTF8());
|
||||||
return std::string(buf.data(), buf.length());
|
return std::string(buf.data(), buf.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a UTF-8 std::string to a wxString.
|
/// Converts a UTF-8 std::string to a wxString.
|
||||||
static wxString UTF8StringToWxString(const std::string_view& str)
|
static inline wxString UTF8StringToWxString(const std::string_view& str)
|
||||||
{
|
{
|
||||||
return wxString::FromUTF8(str.data(), str.length());
|
return wxString::FromUTF8(str.data(), str.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a UTF-8 std::string to a wxString.
|
/// Converts a UTF-8 std::string to a wxString.
|
||||||
static wxString UTF8StringToWxString(const std::string& str)
|
static inline wxString UTF8StringToWxString(const std::string& str)
|
||||||
{
|
{
|
||||||
return wxString::FromUTF8(str.data(), str.length());
|
return wxString::FromUTF8(str.data(), str.length());
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
// http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?view=markup
|
// http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin_x86.h?view=markup
|
||||||
|
|
||||||
static int _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
static inline int _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
||||||
{
|
{
|
||||||
if (Mask == 0)
|
if (Mask == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -40,7 +40,7 @@ static int _BitScanForward(unsigned long* const Index, const unsigned long Mask)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _BitScanReverse(unsigned long* const Index, const unsigned long Mask)
|
static inline int _BitScanReverse(unsigned long* const Index, const unsigned long Mask)
|
||||||
{
|
{
|
||||||
if (Mask == 0)
|
if (Mask == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -58,7 +58,7 @@ enum gamePadValues
|
||||||
PAD_R_LEFT // Right joystick (Left) ←
|
PAD_R_LEFT // Right joystick (Left) ←
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool IsAnalogKey(int index)
|
static inline bool IsAnalogKey(int index)
|
||||||
{
|
{
|
||||||
return ((index >= PAD_L_UP) && (index <= PAD_R_LEFT));
|
return ((index >= PAD_L_UP) && (index <= PAD_R_LEFT));
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ enum PadOptions
|
||||||
PADOPTION_MOUSE_R = 0x40,
|
PADOPTION_MOUSE_R = 0x40,
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool IsAnalogKey(int index)
|
static inline bool IsAnalogKey(int index)
|
||||||
{
|
{
|
||||||
return ((index >= PAD_L_UP) && (index <= PAD_R_LEFT));
|
return ((index >= PAD_L_UP) && (index <= PAD_R_LEFT));
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,8 +243,8 @@ public:
|
||||||
* Will associate `reclut[pagebase + pageidx]` with `mapbase[mappage << 14]`
|
* Will associate `reclut[pagebase + pageidx]` with `mapbase[mappage << 14]`
|
||||||
* Will associate `hwlut[pagebase + pageidx]` with `pageidx << 16`
|
* Will associate `hwlut[pagebase + pageidx]` with `pageidx << 16`
|
||||||
*/
|
*/
|
||||||
static void recLUT_SetPage(uptr reclut[0x10000], u32 hwlut[0x10000],
|
static inline void recLUT_SetPage(uptr reclut[0x10000], u32 hwlut[0x10000],
|
||||||
BASEBLOCK* mapbase, uint pagebase, uint pageidx, uint mappage)
|
BASEBLOCK* mapbase, uint pagebase, uint pageidx, uint mappage)
|
||||||
{
|
{
|
||||||
// this value is in 64k pages!
|
// this value is in 64k pages!
|
||||||
uint page = pagebase + pageidx;
|
uint page = pagebase + pageidx;
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
// Messages Called at Execution Time...
|
// Messages Called at Execution Time...
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
|
|
||||||
static void __fc mVUbadOp0 (u32 prog, u32 pc) { Console.Error("microVU0 Warning: Exiting... Block contains an illegal opcode. [%04x] [%03d]", pc, prog); }
|
static inline void __fc mVUbadOp0 (u32 prog, u32 pc) { Console.Error("microVU0 Warning: Exiting... Block contains an illegal opcode. [%04x] [%03d]", pc, prog); }
|
||||||
static void __fc mVUbadOp1 (u32 prog, u32 pc) { Console.Error("microVU1 Warning: Exiting... Block contains an illegal opcode. [%04x] [%03d]", pc, prog); }
|
static inline void __fc mVUbadOp1 (u32 prog, u32 pc) { Console.Error("microVU1 Warning: Exiting... Block contains an illegal opcode. [%04x] [%03d]", pc, prog); }
|
||||||
static void __fc mVUwarning0(u32 prog, u32 pc) { Console.Error("microVU0 Warning: Exiting from Possible Infinite Loop [%04x] [%03d]", pc, prog); }
|
static inline void __fc mVUwarning0(u32 prog, u32 pc) { Console.Error("microVU0 Warning: Exiting from Possible Infinite Loop [%04x] [%03d]", pc, prog); }
|
||||||
static void __fc mVUwarning1(u32 prog, u32 pc) { Console.Error("microVU1 Warning: Exiting from Possible Infinite Loop [%04x] [%03d]", pc, prog); }
|
static inline void __fc mVUwarning1(u32 prog, u32 pc) { Console.Error("microVU1 Warning: Exiting from Possible Infinite Loop [%04x] [%03d]", pc, prog); }
|
||||||
static void __fc mVUprintPC1(u32 pc) { Console.WriteLn("Block Start PC = 0x%04x", pc); }
|
static inline void __fc mVUprintPC1(u32 pc) { Console.WriteLn("Block Start PC = 0x%04x", pc); }
|
||||||
static void __fc mVUprintPC2(u32 pc) { Console.WriteLn("Block End PC = 0x%04x", pc); }
|
static inline void __fc mVUprintPC2(u32 pc) { Console.WriteLn("Block End PC = 0x%04x", pc); }
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
// Program Range Checking and Setting up Ranges
|
// Program Range Checking and Setting up Ranges
|
||||||
|
|
Loading…
Reference in New Issue