Remove global "using namespace std;" declarations, use "std::" prefixes on all std elements
Fix whitespace changes
This commit is contained in:
committed by
Martin Natano
parent
f0680a29fc
commit
0cba3579de
+10
-10
@@ -16,8 +16,8 @@ namespace
|
||||
{
|
||||
InputHandler *m_pDevice;
|
||||
};
|
||||
vector<LoadedInputHandler> m_InputHandlers;
|
||||
map<InputDevice, InputHandler *> g_mapDeviceToHandler;
|
||||
std::vector<LoadedInputHandler> m_InputHandlers;
|
||||
std::map<InputDevice, InputHandler*> g_mapDeviceToHandler;
|
||||
}
|
||||
|
||||
RageInput::RageInput()
|
||||
@@ -57,7 +57,7 @@ void RageInput::LoadDrivers()
|
||||
g_mapDeviceToHandler.clear();
|
||||
|
||||
// Init optional devices.
|
||||
vector<InputHandler *> apDevices;
|
||||
std::vector<InputHandler *> apDevices;
|
||||
|
||||
InputHandler::Create( g_sInputDrivers, apDevices );
|
||||
for( unsigned i = 0; i < apDevices.size(); ++i )
|
||||
@@ -86,7 +86,7 @@ bool RageInput::DevicesChanged()
|
||||
return false;
|
||||
}
|
||||
|
||||
void RageInput::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevicesOut ) const
|
||||
void RageInput::GetDevicesAndDescriptions( std::vector<InputDeviceInfo>& vDevicesOut ) const
|
||||
{
|
||||
for( unsigned i = 0; i < m_InputHandlers.size(); ++i )
|
||||
m_InputHandlers[i].m_pDevice->GetDevicesAndDescriptions( vDevicesOut );
|
||||
@@ -106,7 +106,7 @@ void RageInput::AddHandler( InputHandler *pHandler )
|
||||
hand.m_pDevice = pHandler;
|
||||
m_InputHandlers.push_back(hand);
|
||||
|
||||
vector<InputDeviceInfo> aDeviceInfo;
|
||||
std::vector<InputDeviceInfo> aDeviceInfo;
|
||||
hand.m_pDevice->GetDevicesAndDescriptions( aDeviceInfo );
|
||||
for (InputDeviceInfo const &idi : aDeviceInfo)
|
||||
g_mapDeviceToHandler[idi.id] = pHandler;
|
||||
@@ -115,7 +115,7 @@ void RageInput::AddHandler( InputHandler *pHandler )
|
||||
/** @brief Return the first InputDriver for the requested InputDevice. */
|
||||
InputHandler *RageInput::GetHandlerForDevice( const InputDevice id )
|
||||
{
|
||||
map<InputDevice, InputHandler *>::iterator it = g_mapDeviceToHandler.find(id);
|
||||
std::map<InputDevice, InputHandler*>::iterator it = g_mapDeviceToHandler.find(id);
|
||||
if( it == g_mapDeviceToHandler.end() )
|
||||
return nullptr;
|
||||
return it->second;
|
||||
@@ -159,10 +159,10 @@ InputDeviceState RageInput::GetInputDeviceState( InputDevice id )
|
||||
|
||||
RString RageInput::GetDisplayDevicesString() const
|
||||
{
|
||||
vector<InputDeviceInfo> vDevices;
|
||||
std::vector<InputDeviceInfo> vDevices;
|
||||
GetDevicesAndDescriptions( vDevices );
|
||||
|
||||
vector<RString> vs;
|
||||
std::vector<RString> vs;
|
||||
for( unsigned i=0; i<vDevices.size(); ++i )
|
||||
{
|
||||
const RString &sDescription = vDevices[i].sDesc;
|
||||
@@ -183,9 +183,9 @@ class LunaRageInput: public Luna<RageInput>
|
||||
public:
|
||||
static int GetDescriptions( T* p, lua_State *L )
|
||||
{
|
||||
vector<InputDeviceInfo> vDevices;
|
||||
std::vector<InputDeviceInfo> vDevices;
|
||||
p->GetDevicesAndDescriptions( vDevices );
|
||||
vector<RString> vsDescriptions;
|
||||
std::vector<RString> vsDescriptions;
|
||||
for (InputDeviceInfo const &idi : vDevices)
|
||||
vsDescriptions.push_back( idi.sDesc );
|
||||
LuaHelpers::CreateTableFromArray( vsDescriptions, L );
|
||||
|
||||
Reference in New Issue
Block a user