mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-22 22:05:38 +00:00
Small code tidy up (moved some code out of header file into cpp file where it belongs)
This commit is contained in:
parent
9297c5b8d2
commit
2e14ec3e6e
|
@ -233,6 +233,26 @@ void CInputs::PrintConfigureInputsHelp()
|
|||
puts("");
|
||||
}
|
||||
|
||||
unsigned CInputs::Count()
|
||||
{
|
||||
return (unsigned)m_inputs.size();
|
||||
}
|
||||
|
||||
CInput *CInputs::operator[](const unsigned index)
|
||||
{
|
||||
return m_inputs[index];
|
||||
}
|
||||
|
||||
CInput *CInputs::operator[](const char *idOrLabel)
|
||||
{
|
||||
for (vector<CInput*>::iterator it = m_inputs.begin(); it != m_inputs.end(); it++)
|
||||
{
|
||||
if (stricmp((*it)->id, idOrLabel) == 0 || stricmp((*it)->label, idOrLabel) == 0)
|
||||
return *it;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
CInputSystem *CInputs::GetInputSystem()
|
||||
{
|
||||
return m_system;
|
||||
|
|
|
@ -148,31 +148,26 @@ public:
|
|||
*/
|
||||
~CInputs();
|
||||
|
||||
/*
|
||||
* Returns the number of available inputs.
|
||||
*/
|
||||
unsigned Count();
|
||||
|
||||
/*
|
||||
* Returns the input with the given index.
|
||||
*/
|
||||
CInput *operator[](const unsigned index);
|
||||
|
||||
/*
|
||||
* Returns the input with the given id or label.
|
||||
*/
|
||||
CInput *operator[](const char *idOrLabel);
|
||||
|
||||
/*
|
||||
* Returns the assigned input system.
|
||||
*/
|
||||
CInputSystem *GetInputSystem();
|
||||
|
||||
unsigned Count()
|
||||
{
|
||||
return (unsigned)m_inputs.size();
|
||||
}
|
||||
|
||||
CInput *operator[](const unsigned index)
|
||||
{
|
||||
return m_inputs[index];
|
||||
}
|
||||
|
||||
CInput *operator[](const char *idOrLabel)
|
||||
{
|
||||
for (vector<CInput*>::iterator it = m_inputs.begin(); it != m_inputs.end(); it++)
|
||||
{
|
||||
if (stricmp((*it)->id, idOrLabel) == 0 || stricmp((*it)->label, idOrLabel) == 0)
|
||||
return *it;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initializes the inputs. Must be called before any other methods are used.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue