summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/ForceFeedback
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-03-15 00:57:56 +0100
committerPierre Bourdon <delroth@gmail.com>2014-03-15 00:57:56 +0100
commit8d679e76d299956a1521bc14502466be8d8b2df8 (patch)
tree97db9ad6a45a8e5d711d7763199579e400a65bc8 /Source/Core/InputCommon/ControllerInterface/ForceFeedback
parent12c2e345a35a571aadc842e30c38b3b4d8f70dce (diff)
parenta82675b7d581421fa80d5d5c53253cf1d5c1a26d (diff)
Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ForceFeedback')
-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;
};