Fix warnings
Some checks failed
debian-build / build (push) Has been cancelled
Push to master / Check Formatting 🔍 (push) Has been cancelled
Push to master / Build Project 🧱 (push) Has been cancelled
Push to master / Create Release 🛫 (push) Has been cancelled

This commit is contained in:
WarmUpTill 2025-12-16 22:46:36 +01:00 committed by WarmUpTill
parent c344c88acd
commit f706416df5
8 changed files with 16 additions and 14 deletions

View File

@ -10,7 +10,7 @@ namespace advss {
enum class HotkeyType;
bool CanSimulateKeyPresses();
void PressKeys(const std::vector<HotkeyType> keys, int duration);
void PressKeys(const std::vector<HotkeyType> &keys, int duration);
class Hotkey {
public:

View File

@ -188,7 +188,7 @@ static const std::unordered_map<HotkeyType, long> keyTable = {
{HotkeyType::Key_NumpadEnter, XK_KP_Enter},
};
void PressKeys(const std::vector<HotkeyType> keys, int duration)
void PressKeys(const std::vector<HotkeyType> &keys, int duration)
{
if (!canSimulateKeyPresses) {
return;

View File

@ -9,7 +9,7 @@ bool CanSimulateKeyPresses()
return canSimulateKeyPresses;
}
void PressKeys(const std::vector<HotkeyType> keys, int duration)
void PressKeys(const std::vector<HotkeyType> &, int)
{
// Not supported on MacOS
return;

View File

@ -138,7 +138,7 @@ static const std::unordered_map<HotkeyType, long> keyTable = {
{HotkeyType::Key_NumpadEnter, VK_RETURN},
};
void PressKeys(const std::vector<HotkeyType> keys, int duration)
void PressKeys(const std::vector<HotkeyType> &keys, int duration)
{
const int repeatInterval = 100;

View File

@ -513,7 +513,7 @@ void ScriptHandler::SetVariableValue(void *, calldata_t *data)
RETURN_SUCCESS();
}
void ScriptHandler::GetRunningStatus(void *ctx, calldata_t *data)
void ScriptHandler::GetRunningStatus(void *, calldata_t *data)
{
calldata_set_bool(data, "is_running", PluginIsRunning());
}

View File

@ -58,14 +58,16 @@ std::string TwitchChannel::GetUserID(const TwitchToken &token) const
}
OBSDataArrayAutoRelease array = obs_data_get_array(res.data, "data");
size_t count = obs_data_array_count(array);
for (size_t i = 0; i < count; i++) {
OBSDataAutoRelease arrayObj = obs_data_array_item(array, i);
std::string id = obs_data_get_string(arrayObj, "id");
userIDCache[_name] = id;
return id;
if (count == 0) {
userIDCache[_name] = "invalid";
return "invalid";
}
userIDCache[_name] = "invalid";
return "invalid";
OBSDataAutoRelease arrayObj = obs_data_array_item(array, 0);
const std::string id = obs_data_get_string(arrayObj, "id");
userIDCache[_name] = id;
return id;
}
static QDate parseRFC3339Date(const std::string &rfc3339Date)

View File

@ -448,7 +448,7 @@ void EventSub::StartServerMigrationClient(const std::string &url)
auto client = std::make_unique<EventSubWSClient>();
SetupClient(*client);
client->set_open_handler([this](connection_hdl hdl) {
client->set_open_handler([this](connection_hdl) {
vblog(LOG_INFO, "Twitch EventSub migration client opened");
});

View File

@ -829,7 +829,7 @@ void TokenGrabberThread::run()
if (_serverThread.joinable()) {
_serverThread.join();
}
_stopWaiting = {false};
_stopWaiting = false;
// Generate URI to request token
auto state = generateStateString();