diff --git a/lib/advanced-scene-switcher.cpp b/lib/advanced-scene-switcher.cpp index 36fc28fa..199c7461 100644 --- a/lib/advanced-scene-switcher.cpp +++ b/lib/advanced-scene-switcher.cpp @@ -29,7 +29,8 @@ AdvSceneSwitcher *AdvSceneSwitcher::window = nullptr; * Create the Advanced Scene Switcher settings window ******************************************************************************/ AdvSceneSwitcher::AdvSceneSwitcher(QWidget *parent) - : QDialog(parent), ui(new Ui_AdvSceneSwitcher) + : QDialog(parent), + ui(new Ui_AdvSceneSwitcher) { switcher->settingsWindowOpened = true; ui->setupUi(this); @@ -258,7 +259,8 @@ void SwitcherData::Thread() } } - vblog(LOG_INFO, "try to sleep for %ld", duration.count()); + vblog(LOG_INFO, "try to sleep for %ld", + (long int)duration.count()); SetWaitScene(); cv.wait_for(lock, duration); @@ -285,7 +287,7 @@ void SwitcherData::Thread() if (linger) { duration = std::chrono::milliseconds(linger); vblog(LOG_INFO, "sleep for %ld before switching scene", - duration.count()); + (long int)duration.count()); SetWaitScene(); cv.wait_for(lock, duration); diff --git a/lib/legacy/switch-media.hpp b/lib/legacy/switch-media.hpp index e817d612..20df4865 100644 --- a/lib/legacy/switch-media.hpp +++ b/lib/legacy/switch-media.hpp @@ -23,7 +23,7 @@ typedef enum { struct MediaSwitch : SceneSwitcherEntry { static bool pause; OBSWeakSource source = nullptr; - obs_media_state state = OBS_MEDIA_STATE_NONE; + int state = OBS_MEDIA_STATE_NONE; bool anyState = false; time_restriction restriction = TIME_RESTRICTION_NONE; int64_t time = 0; diff --git a/lib/macro/macro-tab.cpp b/lib/macro/macro-tab.cpp index b6b58544..07be9941 100644 --- a/lib/macro/macro-tab.cpp +++ b/lib/macro/macro-tab.cpp @@ -32,8 +32,8 @@ bool AdvSceneSwitcher::AddNewMacro(std::shared_ptr &res, QString fmt; int i = 1; if (format.empty()) { - fmt = {obs_module_text( - "AdvSceneSwitcher.macroTab.defaultname")}; + fmt = QString(obs_module_text( + "AdvSceneSwitcher.macroTab.defaultname")); } else { fmt = QString::fromStdString(format); i = 2; diff --git a/lib/macro/macro.cpp b/lib/macro/macro.cpp index 2b8c9c93..ceb49593 100644 --- a/lib/macro/macro.cpp +++ b/lib/macro/macro.cpp @@ -122,7 +122,8 @@ bool Macro::CeckMatch() if (ms.count() >= perfLogThreshold) { blog(LOG_WARNING, "spent %ld ms in %s condition check of macro '%s'!", - ms.count(), c->GetId().c_str(), Name().c_str()); + (long int)ms.count(), c->GetId().c_str(), + Name().c_str()); } c->CheckDurationModifier(cond); diff --git a/plugins/base/macro-condition-replay-buffer.cpp b/plugins/base/macro-condition-replay-buffer.cpp index 0b92ab1d..e6e5d2a3 100644 --- a/plugins/base/macro-condition-replay-buffer.cpp +++ b/plugins/base/macro-condition-replay-buffer.cpp @@ -22,8 +22,6 @@ const static std::map "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 entryData) - : QWidget(parent), _state(new QComboBox()) + : QWidget(parent), + _state(new QComboBox()) { QWidget::connect(_state, SIGNAL(currentIndexChanged(int)), this, SLOT(StateChanged(int))); diff --git a/plugins/twitch/category-selection.cpp b/plugins/twitch/category-selection.cpp index 5e6e5beb..714194ac 100644 --- a/plugins/twitch/category-selection.cpp +++ b/plugins/twitch/category-selection.cpp @@ -166,8 +166,8 @@ const std::map &CategoryGrabber::GetCategories() void CategoryGrabber::run() { if (!_token) { - return; emit Failed(); + return; } { diff --git a/plugins/twitch/chat-connection.cpp b/plugins/twitch/chat-connection.cpp index d73d20a7..ac0fb2a4 100644 --- a/plugins/twitch/chat-connection.cpp +++ b/plugins/twitch/chat-connection.cpp @@ -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::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 | diff --git a/plugins/twitch/event-sub.cpp b/plugins/twitch/event-sub.cpp index bb524b77..dd801a72 100644 --- a/plugins/twitch/event-sub.cpp +++ b/plugins/twitch/event-sub.cpp @@ -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) { diff --git a/plugins/video/opencv-helpers.hpp b/plugins/video/opencv-helpers.hpp index 9632147b..e81869bc 100644 --- a/plugins/video/opencv-helpers.hpp +++ b/plugins/video/opencv-helpers.hpp @@ -1,6 +1,7 @@ #pragma once #include #undef NO // MacOS macro that can conflict with OpenCV +#include #include #ifdef OCR_SUPPORT diff --git a/tests/mocks/obs-data.cpp b/tests/mocks/obs-data.cpp index ebfb406f..922dbafc 100644 --- a/tests/mocks/obs-data.cpp +++ b/tests/mocks/obs-data.cpp @@ -222,7 +222,7 @@ long long obs_data_get_autoselect_int(obs_data_t *data, const char *name) double obs_data_get_autoselect_double(obs_data_t *data, const char *name) { - return 0, 0; + return 0.0; } bool obs_data_get_autoselect_bool(obs_data_t *data, const char *name)