Fix wstring to string conversion warning in Logitech controllers
This commit is contained in:
parent
fc18e404ce
commit
9be9e34be1
9 changed files with 18 additions and 36 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG203LController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
#define PACKET_SIZE 20
|
||||
|
||||
|
|
@ -56,10 +57,7 @@ std::string LogitechG203LController::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG203LController::SendApply()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG213Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechG213Controller::LogitechG213Controller(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
|
|
@ -38,10 +39,7 @@ std::string LogitechG213Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG213Controller::SetDirect
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG810Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechG810Controller::LogitechG810Controller(hid_device* dev_handle_0x11, hid_device* dev_handle_0x12)
|
||||
{
|
||||
|
|
@ -34,10 +35,7 @@ std::string LogitechG810Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG810Controller::Commit()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG815Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechG815Controller::LogitechG815Controller(hid_device* dev_handle_0x11, hid_device* dev_handle_0x12)
|
||||
{
|
||||
|
|
@ -33,10 +34,7 @@ std::string LogitechG815Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG815Controller::Commit()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG910Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechG910Controller::LogitechG910Controller(hid_device* dev_handle_0x11, hid_device* dev_handle_0x12)
|
||||
{
|
||||
|
|
@ -34,10 +35,7 @@ std::string LogitechG910Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG910Controller::Commit()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechG915Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechG915Controller::LogitechG915Controller(hid_device* dev_handle, bool wired)
|
||||
{
|
||||
|
|
@ -49,10 +50,7 @@ std::string LogitechG915Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechG915Controller::Commit()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechGLightsyncController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechGLightsyncController::LogitechGLightsyncController(hid_device* dev_cmd_handle, hid_device *dev_handle, const char *path, unsigned char hid_dev_index, unsigned char hid_feature_index, unsigned char hid_fctn_ase_id)
|
||||
{
|
||||
|
|
@ -54,10 +55,7 @@ std::string LogitechGLightsyncController::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechGLightsyncController::UpdateMouseLED(
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechGProKeyboardController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechGProKeyboardController::LogitechGProKeyboardController(hid_device* dev_handle_0x11, hid_device* dev_handle_0x12)
|
||||
{
|
||||
|
|
@ -34,10 +35,7 @@ std::string LogitechGProKeyboardController::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechGProKeyboardController::Commit()
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <cstring>
|
||||
#include "LogitechX56Controller.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
LogitechX56Controller::LogitechX56Controller(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
|
|
@ -43,10 +44,7 @@ std::string LogitechX56Controller::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring return_wstring = serial_string;
|
||||
std::string return_string(return_wstring.begin(), return_wstring.end());
|
||||
|
||||
return(return_string);
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
void LogitechX56Controller::SetColor(RGBColor color, uint8_t brightness)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue