summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-03-12 15:33:41 -0400
committerLioncash <mathew1800@gmail.com>2014-03-14 13:51:23 -0400
commita82675b7d581421fa80d5d5c53253cf1d5c1a26d (patch)
tree8f1efce1e00c6a7d6044ca3b543d9211a65e8c11 /Source/Core/InputCommon/ControllerInterface
parentdccc6d8b47b1f6fdab5374003492560c20f766b6 (diff)
Kill off some usages of c_str.
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp5
-rw-r--r--Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h5
2 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
index 036b3fda05..1117ed9856 100644
--- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include <string>
#include "InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h"
namespace ciface
@@ -17,7 +18,7 @@ template class ForceFeedbackDevice::Force<DIPERIODIC>;
typedef struct
{
GUID guid;
- const char* name;
+ const std::string name;
} ForceType;
static const ForceType force_type_names[] =
@@ -216,7 +217,7 @@ void ForceFeedbackDevice::ForcePeriodic::SetState(const ControlState state)
}
template <typename P>
-ForceFeedbackDevice::Force<P>::Force(const char* name, EffectState& state)
+ForceFeedbackDevice::Force<P>::Force(const std::string& name, EffectState& state)
: m_name(name), m_state(state)
{
memset(&params, 0, sizeof(params));
diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
index 643ca2434b..54a465d83e 100644
--- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
+++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.h
@@ -5,6 +5,7 @@
#pragma once
#include <list>
+#include <string>
#include "InputCommon/ControllerInterface/Device.h"
@@ -41,10 +42,10 @@ private:
{
public:
std::string GetName() const;
- Force(const char* name, EffectState& state);
+ Force(const std::string& name, EffectState& state);
void SetState(ControlState state);
private:
- const char* m_name;
+ const std::string m_name;
EffectState& m_state;
P params;
};