Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements

Fix whitespace changes
This commit is contained in:
Michael Sundqvist
2022-07-31 22:14:38 +02:00
committed by Martin Natano
parent f0680a29fc
commit 0cba3579de
534 changed files with 3456 additions and 3488 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ public:
* presses may be generated by a single element. The value of the element is
* passed to determine if this is a push or a release. The time is provided
* as an optimization. */
virtual void GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const = 0;
virtual void GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const = 0;
/* Returns the number of IDs assigned starting from startID. This is not
* meaningful for devices like keyboards that all share the same InputDevice
@@ -127,7 +127,7 @@ public:
virtual int AssignIDs( InputDevice startID ) { return 0; }
//Add a device and a description for each logical device.
virtual void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const = 0;
virtual void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const = 0;
};
#endif
+16 -18
View File
@@ -2,8 +2,6 @@
#include "JoystickDevice.h"
#include "RageLog.h"
using std::unordered_map;
Joystick::Joystick() : id( InputDevice_Invalid ),
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
x_rot( 0 ), y_rot( 0 ), z_rot( 0 ), hat( 0 ),
@@ -134,7 +132,7 @@ void JoystickDevice::Open()
ADD( x_rot ); ADD( y_rot ); ADD( z_rot );
ADD( hat );
#undef ADD
for( unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator j = js.mapping.begin(); j != js.mapping.end(); ++j )
for( std::unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator j = js.mapping.begin(); j != js.mapping.end(); ++j )
AddElementToQueue( j->first );
}
}
@@ -152,7 +150,7 @@ bool JoystickDevice::InitDevice( int vid, int pid )
return ret == kIOReturnSuccess;
}
void JoystickDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
void JoystickDevice::GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
{
for (Joystick const &js : m_vSticks)
{
@@ -160,48 +158,48 @@ void JoystickDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDEleme
{
float level = SCALE( value, js.x_min, js.x_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_LEFT, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_RIGHT, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_LEFT, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_RIGHT, std::max(level, 0.0f), now) );
break;
}
else if( js.y_axis == cookie )
{
float level = SCALE( value, js.y_min, js.y_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_UP, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_DOWN, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_UP, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_DOWN, std::max(level, 0.0f), now) );
break;
}
else if( js.z_axis == cookie )
{
float level = SCALE( value, js.z_min, js.z_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_Z_UP, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_Z_DOWN, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_Z_UP, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_Z_DOWN, std::max(level, 0.0f), now) );
break;
}
else if( js.x_rot == cookie )
{
float level = SCALE( value, js.rx_min, js.rx_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_LEFT, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_RIGHT, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_LEFT, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_RIGHT, std::max(level, 0.0f), now) );
break;
}
else if( js.y_rot == cookie )
{
float level = SCALE( value, js.ry_min, js.ry_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_UP, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_DOWN, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_UP, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_DOWN, std::max(level, 0.0f), now) );
break;
}
else if( js.z_rot == cookie )
{
float level = SCALE( value, js.rz_min, js.rz_max, -1.0f, 1.0f );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_Z_UP, max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_Z_DOWN, max(level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_Z_UP, std::max(-level, 0.0f), now) );
vPresses.push_back( DeviceInput(js.id, JOY_ROT_Z_DOWN, std::max(level, 0.0f), now) );
break;
}
else if( js.hat == cookie )
@@ -231,7 +229,7 @@ void JoystickDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDEleme
else
{
// hash_map<T,U>::operator[] is not const
unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter;
std::unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter;
iter = js.mapping.find( cookie );
if( iter != js.mapping.end() )
@@ -260,7 +258,7 @@ int JoystickDevice::AssignIDs( InputDevice startID )
return m_vSticks.size();
}
void JoystickDevice::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const
void JoystickDevice::GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const
{
for (auto &i : m_vSticks)
vDevices.push_back( InputDeviceInfo(i.id,GetDescription()) );
+3 -3
View File
@@ -23,7 +23,7 @@ struct Joystick
class JoystickDevice : public HIDDevice
{
private:
vector<Joystick> m_vSticks;
std::vector<Joystick> m_vSticks;
protected:
bool AddLogicalDevice( int usagePage, int usage );
@@ -32,9 +32,9 @@ protected:
bool InitDevice( int vid, int pid );
public:
void GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
int AssignIDs( InputDevice startID );
void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const;
void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const;
};
#endif
+4 -4
View File
@@ -162,16 +162,16 @@ void KeyboardDevice::AddElement( int usagePage, int usage, IOHIDElementCookie co
void KeyboardDevice::Open()
{
for( unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator i = m_Mapping.begin(); i != m_Mapping.end(); ++i )
for( std::unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator i = m_Mapping.begin(); i != m_Mapping.end(); ++i )
{
//LOG->Trace( "Adding %s to queue, cookie %p", DeviceButtonToString(i->second).c_str(), i->first );
AddElementToQueue( i->first );
}
}
void KeyboardDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
void KeyboardDevice::GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
{
unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter = m_Mapping.find( cookie );
std::unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter = m_Mapping.find( cookie );
if( iter != m_Mapping.end() )
{
@@ -180,7 +180,7 @@ void KeyboardDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDEleme
}
}
void KeyboardDevice::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const
void KeyboardDevice::GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const
{
if( vDevices.size() && vDevices[0].id == DEVICE_KEYBOARD )
return;
+2 -2
View File
@@ -14,8 +14,8 @@ protected:
void Open();
public:
void GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const;
void GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const;
static bool DeviceButtonToMacVirtualKey( DeviceButton button, UInt8 &iMacVKOut );
};
+6 -8
View File
@@ -1,8 +1,6 @@
#include "global.h"
#include "MouseDevice.h"
using std::unordered_map;
Mouse::Mouse() : id( InputDevice_Invalid ),
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
x_min( 0 ), x_max( 0 ), y_min( 0 ),
@@ -94,11 +92,11 @@ void MouseDevice::Open()
#define ADD(x) if( m.x ) AddElementToQueue( m.x )
ADD( x_axis ); ADD( y_axis ); ADD( z_axis );
#undef ADD
for( unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator i = m_Mapping.begin(); i != m_Mapping.end(); ++i )
for( std::unordered_map<IOHIDElementCookie,DeviceButton>::const_iterator i = m_Mapping.begin(); i != m_Mapping.end(); ++i )
AddElementToQueue( i->first );
}
void MouseDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
void MouseDevice::GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
{
// todo: add mouse axis stuff -aj
const Mouse& m = m_Mouse;
@@ -119,18 +117,18 @@ void MouseDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementC
else if( m.z_axis == cookie )
{
float level = SCALE( value, m.z_min, m.z_max, -1.0f, 1.0f );
INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELUP, max(-level,0), now) );
INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELDOWN, max(+level,0), now) );
INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELUP, std::max(-level, 0.0f), now) );
INPUTFILTER->ButtonPressed( DeviceInput(DEVICE_MOUSE, MOUSE_WHEELDOWN, std::max(+level, 0.0f), now) );
}
else
{
unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter = m_Mapping.find( cookie );
std::unordered_map<IOHIDElementCookie, DeviceButton>::const_iterator iter = m_Mapping.find( cookie );
if( iter != m_Mapping.end() )
vPresses.push_back( DeviceInput(DEVICE_MOUSE, iter->second, value, now) );
}
}
void MouseDevice::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const
void MouseDevice::GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const
{
vDevices.push_back( InputDeviceInfo(DEVICE_MOUSE, "Mouse") );
}
+2 -2
View File
@@ -30,8 +30,8 @@ protected:
Mouse GetMouse(){ return m_Mouse; }
public:
void GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const;
void GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const;
};
#endif
+2 -2
View File
@@ -11,7 +11,7 @@ void PumpDevice::Open()
AddElementToQueue( IOHIDElementCookie(8) );
}
void PumpDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
void PumpDevice::GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
{
DeviceButton db1 = DeviceButton_Invalid;
DeviceButton db2 = DeviceButton_Invalid;
@@ -58,7 +58,7 @@ int PumpDevice::AssignIDs( InputDevice startID )
return 1;
}
void PumpDevice::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const
void PumpDevice::GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const
{
vDevices.push_back( InputDeviceInfo(m_Id, "Pump USB") );
}
+2 -2
View File
@@ -16,9 +16,9 @@ protected:
bool InitDevice( int vid, int pid ) { return vid == 0x0d2f && pid == 0x0001; }
public:
void GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
void GetButtonPresses( std::vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const;
int AssignIDs( InputDevice startID );
void GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const;
void GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevices ) const;
};
#endif
+1 -1
View File
@@ -72,7 +72,7 @@ void UnexpectedExceptionHandler()
void InstallExceptionHandler()
{
set_terminate( UnexpectedExceptionHandler );
std::set_terminate( UnexpectedExceptionHandler );
}
/*
+1 -1
View File
@@ -500,7 +500,7 @@ static bool PointsToValidCall( vm_address_t start, const void *ptr )
/* We're reading buf backwards, between buf[-7] and buf[-1]. Find out how
* far we can read. */
const int len = min( intptr_t(ptr)-start, 7U );
const int len = std::min<int>(intptr_t(ptr) - start, 7);
// Permissible CALL sequences that we care about:
//
+1 -1
View File
@@ -371,7 +371,7 @@ void CrashHandler::ForceDeadlock( RString reason, uint64_t iID )
strncpy( crash.m_ThreadName[0], RageThread::GetCurrentThreadName(), sizeof(crash.m_ThreadName[0])-1 );
strncpy( crash.reason, reason, min(sizeof(crash.reason) - 1, reason.length()) );
strncpy( crash.reason, reason, std::min(sizeof(crash.reason) - 1, reason.length()) );
crash.reason[ sizeof(crash.reason)-1 ] = 0;
RunCrashHandler( &crash );
+1 -1
View File
@@ -134,7 +134,7 @@ static void child_process()
if( !child_read(3, temp, size) )
return;
vector<RString> Checkpoints;
std::vector<RString> Checkpoints;
split(temp, "$$", Checkpoints);
delete [] temp;
+2 -2
View File
@@ -31,8 +31,8 @@ extern "C" int sigaltstack(const stack_t * __restrict, stack_t * __restrict);
static int find_stack_direction2( char *p ) NOINLINE;
static int find_stack_direction() NOINLINE;
static vector<SignalHandler::handler> handlers;
unique_ptr<SaveSignals> saved_sigs;
static std::vector<SignalHandler::handler> handlers;
std::unique_ptr<SaveSignals> saved_sigs;
static int signals[] =
{
+1 -1
View File
@@ -6,7 +6,7 @@
class SaveSignals
{
vector<struct sigaction> old_handlers;
std::vector<struct sigaction> old_handlers;
public:
SaveSignals(); /* save signals */
+3 -3
View File
@@ -446,8 +446,8 @@ struct CompleteCrashData
RString m_sInfo;
RString m_sAdditionalLog;
RString m_sCrashedThread;
vector<RString> m_asRecent;
vector<RString> m_asCheckpoints;
std::vector<RString> m_asRecent;
std::vector<RString> m_asCheckpoints;
};
static void MakeCrashReport( const CompleteCrashData &Data, RString &sOut )
@@ -455,7 +455,7 @@ static void MakeCrashReport( const CompleteCrashData &Data, RString &sOut )
sOut += ssprintf(
"%s crash report (build %s, %s @ %s)\n"
"--------------------------------------\n\n",
(string(PRODUCT_FAMILY) + product_version).c_str(), ::sm_version_git_hash, version_date, version_time );
(std::string(PRODUCT_FAMILY) + product_version).c_str(), ::sm_version_git_hash, version_date, version_time );
sOut += ssprintf( "Crash reason: %s\n", Data.m_CrashInfo.m_CrashReason );
sOut += ssprintf( "\n" );
@@ -582,7 +582,7 @@ NetworkPostData::~NetworkPostData()
}
/** @brief Create a MIME multipart data block from the given set of fields. */
void NetworkPostData::CreateMimeData( const map<RString,RString> &mapNameToData, RString &sOut, RString &sMimeBoundaryOut )
void NetworkPostData::CreateMimeData( const std::map<RString, RString> &mapNameToData, RString &sOut, RString &sMimeBoundaryOut )
{
// Find a non-conflicting mime boundary.
while(1)
@@ -667,7 +667,7 @@ void NetworkPostData::HttpThread()
// Parse the results.
int iStart = 0, iSize = -1;
map<RString,RString> mapHeaders;
std::map<RString, RString> mapHeaders;
while( 1 )
{
split( sResult, "\n", iStart, iSize, false );
+2 -2
View File
@@ -30,7 +30,7 @@ public:
RString GetResult() const { return m_sResult; }
private:
static void CreateMimeData( const map<RString,RString> &mapNameToData, RString &sOut, RString &sMimeBoundaryOut );
static void CreateMimeData( const std::map<RString, RString> &mapNameToData, RString &sOut, RString &sMimeBoundaryOut );
void SetProgress( float fProgress );
RageThread m_Thread;
@@ -42,7 +42,7 @@ private:
float m_fProgress;
// When the thread exists, it owns the rest of the data, regardless of m_Mutex.
map<RString, RString> m_Data;
std::map<RString, RString> m_Data;
bool m_bFinished;
RString m_sHost;
+6 -6
View File
@@ -89,13 +89,13 @@ static void GetDriveDebugInfo9x()
* DMACurrentlyUsed 0 or 1
* DeviceDesc "GENERIC IDE DISK TYPE01"
*/
vector<RString> Drives;
std::vector<RString> Drives;
if( !RegistryAccess::GetRegSubKeys( "HKEY_LOCAL_MACHINE\\Enum\\ESDI", Drives ) )
return;
for( unsigned drive = 0; drive < Drives.size(); ++drive )
{
vector<RString> IDs;
std::vector<RString> IDs;
if( !RegistryAccess::GetRegSubKeys( Drives[drive], IDs ) )
continue;
@@ -128,7 +128,7 @@ static void GetDriveDebugInfoNT()
* Identifier "WDC WD1200JB-75CRA0"
* Type "DiskPeripheral"
*/
vector<RString> Ports;
std::vector<RString> Ports;
if( !RegistryAccess::GetRegSubKeys( "HKEY_LOCAL_MACHINE\\HARDWARE\\DEVICEMAP\\Scsi", Ports ) )
return;
@@ -140,19 +140,19 @@ static void GetDriveDebugInfoNT()
RString Driver;
RegistryAccess::GetRegValue( Ports[i], "Driver", Driver );
vector<RString> Busses;
std::vector<RString> Busses;
if( !RegistryAccess::GetRegSubKeys( Ports[i], Busses, "Scsi Bus .*" ) )
continue;
for( unsigned bus = 0; bus < Busses.size(); ++bus )
{
vector<RString> TargetIDs;
std::vector<RString> TargetIDs;
if( !RegistryAccess::GetRegSubKeys( Busses[bus], TargetIDs, "Target Id .*" ) )
continue;
for( unsigned tid = 0; tid < TargetIDs.size(); ++tid )
{
vector<RString> LUIDs;
std::vector<RString> LUIDs;
if( !RegistryAccess::GetRegSubKeys( TargetIDs[tid], LUIDs, "Logical Unit Id .*" ) )
continue;
+4 -4
View File
@@ -25,7 +25,7 @@ RString werr_ssprintf( int err, const char *fmt, ... )
return s += ssprintf( " (%s)", text.c_str() );
}
RString ConvertWstringToCodepage( wstring s, int iCodePage )
RString ConvertWstringToCodepage( std::wstring s, int iCodePage )
{
if( s.empty() )
return RString();
@@ -48,17 +48,17 @@ RString ConvertUTF8ToACP( const RString &s )
return ConvertWstringToCodepage( RStringToWstring(s), CP_ACP );
}
wstring ConvertCodepageToWString( RString s, int iCodePage )
std::wstring ConvertCodepageToWString( RString s, int iCodePage )
{
if( s.empty() )
return wstring();
return std::wstring();
int iBytes = MultiByteToWideChar( iCodePage, 0, s.data(), s.size(), nullptr, 0 );
ASSERT_M( iBytes > 0, werr_ssprintf( GetLastError(), "MultiByteToWideChar" ).c_str() );
wchar_t *pTemp = new wchar_t[iBytes];
MultiByteToWideChar( iCodePage, 0, s.data(), s.size(), pTemp, iBytes );
wstring sRet( pTemp, iBytes );
std::wstring sRet( pTemp, iBytes );
delete [] pTemp;
return sRet;
+2 -2
View File
@@ -2,9 +2,9 @@
#define ERROR_STRINGS_H
RString werr_ssprintf( int err, const char *fmt, ... );
RString ConvertWstringToCodepage( wstring s, int iCodePage );
RString ConvertWstringToCodepage( std::wstring s, int iCodePage );
RString ConvertUTF8ToACP( const RString &s );
wstring ConvertCodepageToWString( RString s, int iCodePage );
std::wstring ConvertCodepageToWString( RString s, int iCodePage );
RString ConvertACPToUTF8( const RString &s );
#endif
+3 -3
View File
@@ -70,10 +70,10 @@ static LRESULT CALLBACK GraphicsWindow_WndProc( HWND hWnd, UINT msg, WPARAM wPar
if( !g_bHasFocus )
{
RString sName = GetNewWindow();
static set<RString> sLostFocusTo;
static std::set<RString> sLostFocusTo;
sLostFocusTo.insert( sName );
RString sStr;
for( set<RString>::const_iterator it = sLostFocusTo.begin(); it != sLostFocusTo.end(); ++it )
for( std::set<RString>::const_iterator it = sLostFocusTo.begin(); it != sLostFocusTo.end(); ++it )
sStr += (sStr.size()?", ":"") + *it;
LOG->MapLog( "LOST_FOCUS", "Lost focus to: %s", sStr.c_str() );
@@ -432,7 +432,7 @@ void GraphicsWindow::Initialize( bool bD3D )
AppInstance inst;
do
{
const wstring wsClassName = RStringToWstring( g_sClassName );
const std::wstring wsClassName = RStringToWstring( g_sClassName );
WNDCLASSW WindowClassW =
{
CS_OWNDC | CS_BYTEALIGNCLIENT,
+2 -2
View File
@@ -112,7 +112,7 @@ bool RegistryAccess::GetRegValue( const RString &sKey, const RString &sName, boo
return b;
}
bool RegistryAccess::GetRegSubKeys( const RString &sKey, vector<RString> &lst, const RString &regex, bool bReturnPathToo )
bool RegistryAccess::GetRegSubKeys( const RString &sKey, std::vector<RString> &lst, const RString &regex, bool bReturnPathToo )
{
HKEY hKey = OpenRegKey( sKey, READ );
if( hKey == nullptr )
@@ -196,7 +196,7 @@ bool RegistryAccess::CreateKey( const RString &sKey )
RString sSubkey;
HKEY hType;
if( !GetRegKeyType(sKey, sSubkey, hType) )
return nullptr;
return false;
HKEY hKey;
DWORD dwDisposition = 0;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace RegistryAccess
bool GetRegValue( const RString &sKey, const RString &sName, int &val, bool bWarnOnError = true );
bool GetRegValue( const RString &sKey, const RString &sName, bool &val );
bool GetRegSubKeys( const RString &sKey, vector<RString> &asList, const RString &sRegex = ".*", bool bReturnPathToo = true );
bool GetRegSubKeys( const RString &sKey, std::vector<RString> &asList, const RString &sRegex = ".*", bool bReturnPathToo = true );
bool SetRegValue( const RString &sKey, const RString &sName, const RString &val );
bool SetRegValue( const RString &sKey, const RString &sName, int val );
+1 -1
View File
@@ -189,7 +189,7 @@ int WindowsFileIO::read( void *p )
return finish_read(p);
}
int WindowsFileIO::read_several(const vector<WindowsFileIO *> &sources, void *p, int &actual, float timeout)
int WindowsFileIO::read_several(const std::vector<WindowsFileIO *> &sources, void *p, int &actual, float timeout)
{
HANDLE *Handles = new HANDLE[sources.size()];
for( unsigned i = 0; i < sources.size(); ++i )
+1 -1
View File
@@ -17,7 +17,7 @@ public:
/* Nonblocking read. size must always be the same. Returns the number of bytes
* read, or 0. */
int read( void *p );
static int read_several( const vector<WindowsFileIO *> &sources, void *p, int &actual, float timeout );
static int read_several( const std::vector<WindowsFileIO *> &sources, void *p, int &actual, float timeout );
private:
void queue_read();
+1 -1
View File
@@ -68,7 +68,7 @@ bool GetVideoDriverInfo( int iCardno, VideoDriverInfo &info )
const bool bIsWin9x = version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS;
static bool bInitialized=false;
static vector<RString> lst;
static std::vector<RString> lst;
if( !bInitialized )
{
bInitialized = true;