mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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).
This commit is contained in:
@ -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(¶ms, 0, sizeof(params));
|
||||
|
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user