Fix warnings

This commit is contained in:
WarmUpTill
2024-02-04 15:25:27 +01:00
committed by WarmUpTill
parent ce262f0dad
commit 84e01c0c9c
10 changed files with 30 additions and 23 deletions

View File

@@ -22,8 +22,6 @@ const static std::map<MacroConditionReplayBuffer::Condition, std::string>
"AdvSceneSwitcher.condition.replay.state.saved"},
};
static bool replayBufferSaved = false;
static std::chrono::high_resolution_clock::time_point replayBufferSaveTime{};
static bool setupReplayBufferEventHandler();
static bool replayBufferEventHandlerIsSetup = setupReplayBufferEventHandler();
@@ -94,7 +92,8 @@ static inline void populateStateSelection(QComboBox *list)
MacroConditionReplayBufferEdit::MacroConditionReplayBufferEdit(
QWidget *parent, std::shared_ptr<MacroConditionReplayBuffer> entryData)
: QWidget(parent), _state(new QComboBox())
: QWidget(parent),
_state(new QComboBox())
{
QWidget::connect(_state, SIGNAL(currentIndexChanged(int)), this,
SLOT(StateChanged(int)));

View File

@@ -166,8 +166,8 @@ const std::map<QString, int> &CategoryGrabber::GetCategories()
void CategoryGrabber::run()
{
if (!_token) {
return;
emit Failed();
return;
}
{

View File

@@ -11,8 +11,7 @@ using websocketpp::lib::placeholders::_1;
using websocketpp::lib::placeholders::_2;
using websocketpp::lib::bind;
static constexpr int reconnectDelay = 15;
static constexpr int messageIDBufferSize = 20;
static const int reconnectDelay = 15;
/* ------------------------------------------------------------------------- */
@@ -331,7 +330,9 @@ std::map<TwitchChatConnection::ChatMapKey, std::weak_ptr<TwitchChatConnection>>
TwitchChatConnection::TwitchChatConnection(const TwitchToken &token,
const TwitchChannel &channel)
: QObject(nullptr), _token(token), _channel(channel)
: QObject(nullptr),
_token(token),
_channel(channel)
{
_client.get_alog().clear_channels(
websocketpp::log::alevel::frame_header |

View File

@@ -12,17 +12,20 @@ using websocketpp::lib::placeholders::_2;
using websocketpp::lib::bind;
#ifdef USE_TWITCH_CLI_MOCK
constexpr std::string_view defaultURL = "ws://127.0.0.1:8080/ws";
constexpr std::string_view registerSubscriptionURL = "http://127.0.0.1:8080";
constexpr std::string_view registerSubscriptionPath = "/eventsub/subscriptions";
static constexpr std::string_view defaultURL = "ws://127.0.0.1:8080/ws";
static constexpr std::string_view registerSubscriptionURL =
"http://127.0.0.1:8080";
static constexpr std::string_view registerSubscriptionPath =
"/eventsub/subscriptions";
#else
constexpr std::string_view defaultURL = "wss://eventsub.wss.twitch.tv/ws";
constexpr std::string_view registerSubscriptionURL = "https://api.twitch.tv";
constexpr std::string_view registerSubscriptionPath =
static constexpr std::string_view defaultURL =
"wss://eventsub.wss.twitch.tv/ws";
static constexpr std::string_view registerSubscriptionURL =
"https://api.twitch.tv";
static constexpr std::string_view registerSubscriptionPath =
"/helix/eventsub/subscriptions";
#endif
const int reconnectDelay = 15;
const int messageIDBufferSize = 20;
static const int reconnectDelay = 15;
EventSub::EventSub() : QObject(nullptr)
{

View File

@@ -1,6 +1,7 @@
#pragma once
#include <QImage>
#undef NO // MacOS macro that can conflict with OpenCV
#include <cstddef>
#include <opencv2/opencv.hpp>
#ifdef OCR_SUPPORT