diff --git a/Src/Inputs/Input.cpp b/Src/Inputs/Input.cpp index 5a9ef29..86bb828 100644 --- a/Src/Inputs/Input.cpp +++ b/Src/Inputs/Input.cpp @@ -153,9 +153,9 @@ void CInput::LoadFromConfig(const Util::Config::Node &config) if (IsConfigurable()) { // If so, check INI file for mapping string - string key("Input"); + std::string key("Input"); key.append(id); - string mapping; + std::string mapping; auto *node = config.TryGet(key); if (node) { @@ -174,7 +174,7 @@ void CInput::StoreToConfig(Util::Config::Node *config) { if (!IsConfigurable()) return; - string key("Input"); + std::string key("Input"); key.append(id); config->Set(key, m_mapping); } diff --git a/Src/Inputs/InputSource.h b/Src/Inputs/InputSource.h index 6340dc1..de473c4 100644 --- a/Src/Inputs/InputSource.h +++ b/Src/Inputs/InputSource.h @@ -29,7 +29,6 @@ #define INCLUDED_INPUTSOURCE_H #include -using namespace std; class CInputSystem; struct ForceFeedbackCmd; diff --git a/Src/Inputs/InputSystem.h b/Src/Inputs/InputSystem.h index 4d861ee..b71b12d 100644 --- a/Src/Inputs/InputSystem.h +++ b/Src/Inputs/InputSystem.h @@ -32,8 +32,6 @@ #include #include #include -using namespace std; - #include "MultiInputSource.h" #include "Util/NewConfig.h" @@ -355,9 +353,9 @@ private: JoySettings m_defJoySettings; // Current key, mouse and joystick settings for attached keyboards, mice and joysticks - vector m_keySettings; - vector m_mseSettings; - vector m_joySettings; + std::vector m_keySettings; + std::vector m_mseSettings; + std::vector m_joySettings; // Empty input source CMultiInputSource *m_emptySource; @@ -399,46 +397,46 @@ private: */ CInputSource *GetJoySource(int joyNum, EJoyPart joyPart); - void CheckAllSources(unsigned readFlags, bool fullAxisOnly, bool &mseCentered, vector &sources, string &mapping, vector &badSources); + void CheckAllSources(unsigned readFlags, bool fullAxisOnly, bool &mseCentered, std::vector &sources, std::string &mapping, std::vector &badSources); /* * Finds any currently activated key sources for the given keyboard number (or all keyboards if ANY_KEYBOARD supplied) * and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string. * If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered. */ - void CheckKeySources(int kbdNum, bool fullAxisOnly, vector &sources, string &mapping, vector &badSources); + void CheckKeySources(int kbdNum, bool fullAxisOnly, std::vector &sources, std::string &mapping, std::vector &badSources); /* * Finds any currently activated mouse sources for the given mouse number (or all mice if ANY_MOUSE supplied) * and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string. * If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered. */ - void CheckMouseSources(int mseNum, bool fullAxisOnly, bool mseCentered, vector &sources, string &mapping, vector &badSources); + void CheckMouseSources(int mseNum, bool fullAxisOnly, bool mseCentered, std::vector &sources, std::string &mapping, std::vector &badSources); /* * Finds any currently activated joystick sources for the given joystick number (or all joysticks if ANY_JOYSTICK supplied) * and adds them to the sources vector, aswell as constructing the corresponding mapping(s) in the given string. * If fullAxisOnly is true, then only sources that represent a full axis range (eg MouseXAxis) are considered. */ - void CheckJoySources(int joyNum, bool fullAxisOnly, vector &sources, string &mapping, vector &badSources); + void CheckJoySources(int joyNum, bool fullAxisOnly, std::vector &sources, std::string &mapping, std::vector &badSources); - bool ParseInt(string str, int &num); + bool ParseInt(std::string str, int &num); - string IntToString(int num); + std::string IntToString(int num); - bool EqualsIgnoreCase(string str1, const char *str2); + bool EqualsIgnoreCase(std::string str1, const char *str2); - bool StartsWithIgnoreCase(string str1, const char *str2); + bool StartsWithIgnoreCase(std::string str1, const char *str2); /* * Returns true if the given string represents a valid key name. */ - bool IsValidKeyName(string str); + bool IsValidKeyName(std::string str); /* * Returns the EMousePart with the given mapping name or MouseUnknown if not found. */ - EMousePart LookupMousePart(string str); + EMousePart LookupMousePart(std::string str); /* * Returns the mapping name for the given EMousePart. @@ -448,26 +446,26 @@ private: /* * Returns the EJoyPart with the given mapping name or JoyUnknown if not found. */ - EJoyPart LookupJoyPart(string str); + EJoyPart LookupJoyPart(std::string str); /* * Returns the mapping name for the given EJoyPart. */ const char *LookupName(EJoyPart joyPart); - size_t ParseDevMapping(string str, const char *devType, int &devNum); + size_t ParseDevMapping(std::string str, const char *devType, int &devNum); /* * Parses the given mapping string, possibly representing more than one mapping, and returns an input source for it or NULL if the * mapping is invalid. * If fullAxisOnly is true, then only mappings that represent a full axis range (eg MouseXAxis) are parsed. */ - CInputSource* ParseMultiSource(string str, bool fullAxisOnly, bool isOr); + CInputSource* ParseMultiSource(std::string str, bool fullAxisOnly, bool isOr); /* * Parses the given single mapping string and returns an input source for it, or NULL if non exists. */ - CInputSource* ParseSingleSource(string str); + CInputSource* ParseSingleSource(std::string str); /* * Prints the given key settings to stdout. diff --git a/Src/Inputs/InputTypes.cpp b/Src/Inputs/InputTypes.cpp index babe5f6..c8d8b24 100644 --- a/Src/Inputs/InputTypes.cpp +++ b/Src/Inputs/InputTypes.cpp @@ -184,7 +184,7 @@ CTriggerInput::CTriggerInput(const char *inputId, const char *inputLabel, unsign void CTriggerInput::LoadFromConfig(const Util::Config::Node &config) { - string key("Input"); + std::string key("Input"); key.append(id); auto *node = config.TryGet(key); if (node) @@ -193,7 +193,7 @@ void CTriggerInput::LoadFromConfig(const Util::Config::Node &config) void CTriggerInput::StoreToConfig(Util::Config::Node *config) { - string key("Input"); + std::string key("Input"); key.append(id); config->Set(key, (unsigned) m_autoTrigger); } diff --git a/Src/Inputs/Inputs.h b/Src/Inputs/Inputs.h index 04999a4..d2708c2 100644 --- a/Src/Inputs/Inputs.h +++ b/Src/Inputs/Inputs.h @@ -30,9 +30,7 @@ #include "Types.h" #include "Util/NewConfig.h" - #include -using namespace std; class CInputSystem; class CInput; @@ -53,7 +51,7 @@ private: CInputSystem *m_system; // Vector of all created inputs - vector m_inputs; + std::vector m_inputs; /* * Adds a switch input (eg button) to this collection. diff --git a/Src/Inputs/MultiInputSource.h b/Src/Inputs/MultiInputSource.h index b194af8..00779ac 100644 --- a/Src/Inputs/MultiInputSource.h +++ b/Src/Inputs/MultiInputSource.h @@ -30,9 +30,8 @@ #define INCLUDED_MULTIINPUTSOURCE_H #include "InputSource.h" - #include -using namespace std; + /* * Represents a collection of input sources and combines their values into a single value. @@ -56,7 +55,7 @@ public: /* * Returns the combined source type of the given vector of sources. */ - static ESourceType GetCombinedType(vector &sources); + static ESourceType GetCombinedType(std::vector &sources); /* * Constructs an 'empty' source (ie one which is always 'off'). @@ -69,7 +68,7 @@ public: * switch inputs must be active for this input to have a value (which will be the value of the first non-switch input in the list, * or the first switch input if there are none). */ - CMultiInputSource(bool isOr, vector &sources); + CMultiInputSource(bool isOr, std::vector &sources); ~CMultiInputSource(); diff --git a/Src/Model3/PCI.h b/Src/Model3/PCI.h index c5b955c..501d9e2 100644 --- a/Src/Model3/PCI.h +++ b/Src/Model3/PCI.h @@ -37,9 +37,6 @@ #include -using namespace std; - - /* * IPCIDevice: * @@ -183,7 +180,7 @@ private: }; // An array of device objects - vector DeviceVector; + std::vector DeviceVector; }; diff --git a/Src/Model3/Real3D.h b/Src/Model3/Real3D.h index 4070d9b..f69d281 100644 --- a/Src/Model3/Real3D.h +++ b/Src/Model3/Real3D.h @@ -451,8 +451,8 @@ private: uint8_t *textureRAMDirty; // Queued texture uploads - vector queuedUploadTextures; - vector queuedUploadTexturesRO; // Read-only copy of queue + std::vector queuedUploadTextures; + std::vector queuedUploadTexturesRO; // Read-only copy of queue // Big endian bus object for DMA memory access IBus *Bus; diff --git a/Src/OSD/SDL/Audio.cpp b/Src/OSD/SDL/Audio.cpp index 8811727..d97dbfc 100755 --- a/Src/OSD/SDL/Audio.cpp +++ b/Src/OSD/SDL/Audio.cpp @@ -268,7 +268,7 @@ bool OpenAudio() // Set initial play position to be beginning of buffer and initial write position to be half-way into buffer playPos = 0; - writePos = min(audioBufferSize - BYTES_PER_FRAME, (BYTES_PER_FRAME + audioBufferSize) / 2); + writePos = std::min(audioBufferSize - BYTES_PER_FRAME, (BYTES_PER_FRAME + audioBufferSize) / 2); writeWrapped = false; // Reset counters