Skip to content

Commit b88ac48

Browse files
authored
Rework warning supression (#610)
1 parent 7877a3d commit b88ac48

File tree

11 files changed

+7
-40
lines changed

11 files changed

+7
-40
lines changed

3rdParty/dpp/DPP_SilenceWarnings.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

3rdParty/opencv-4.11.0/opencv2/core/types.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,10 +1851,8 @@ template<typename _Tp> inline
18511851
_Tp Rect_<_Tp>::area() const
18521852
{
18531853
const _Tp result = width * height;
1854-
if constexpr (std::numeric_limits<_Tp>::is_integer)
1855-
{
1856-
CV_DbgAssert(width == 0 || result / width == height); // make sure the result fits in the return value
1857-
}
1854+
CV_DbgAssert(!std::numeric_limits<_Tp>::is_integer
1855+
|| width == 0 || result / width == height); // make sure the result fits in the return value
18581856
return result;
18591857
}
18601858

SerialPrograms/Source/CommonFramework/Main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <QFileInfo>
55
//#include <QTextStream>
66
#include <QMessageBox>
7-
#include <dpp/DPP_SilenceWarnings.h>
87
#include <Integrations/DppIntegration/DppClient.h>
98
#include "Common/Cpp/Exceptions.h"
109
#include "Common/Cpp/ImageResolution.h"

SerialPrograms/Source/CommonFramework/Notifications/ProgramNotifications.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
#include <QFile>
8-
#include <dpp/DPP_SilenceWarnings.h>
98
#include <Integrations/DppIntegration/DppClient.h>
109
#include "Common/Cpp/PrettyPrint.h"
1110
#include "Common/Cpp/Json/JsonValue.h"

SerialPrograms/Source/CommonFramework/Panels/PanelInstance.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class PanelInstance{
3838
public:
3939
// Serialization
4040
void from_json();
41-
virtual void from_json(const JsonValue& json){}
41+
virtual void from_json([[maybe_unused]] const JsonValue& json){}
4242
virtual JsonValue to_json() const;
4343

4444
protected:

SerialPrograms/Source/Integrations/DiscordIntegrationSettings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <QHBoxLayout>
88
#include <QLabel>
99
#include <QPushButton>
10-
#include <dpp/DPP_SilenceWarnings.h>
1110
#include "Common/Qt/StringToolsQt.h"
1211
//#include "CommonFramework/Globals.h"
1312
//#include "CommonFramework/GlobalSettingsPanel.h"
@@ -122,7 +121,7 @@ DiscordIntegrationSettingsOption::DiscordIntegrationSettingsOption()
122121
this->add_listener(*this);
123122
library0.add_listener(*this);
124123
}
125-
void DiscordIntegrationSettingsOption::on_config_value_changed(void* object){
124+
void DiscordIntegrationSettingsOption::on_config_value_changed([[maybe_unused]] void* object){
126125
// cout << this->enabled() << endl;
127126
#if (defined PA_SLEEPY || defined PA_DPP)
128127
bool options_enabled = this->enabled();

SerialPrograms/Source/Integrations/DppIntegration/DppClient.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifdef PA_DPP
22

33
#include <set>
4-
#include <dpp/DPP_SilenceWarnings.h>
54
#include <dpp/dpp.h>
65
#include <Integrations/DppIntegration/DppClient.h>
76
#include <Integrations/DppIntegration/DppCommandHandler.h>

SerialPrograms/Source/Integrations/DppIntegration/DppCommandHandler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifdef PA_DPP
22

33
#include <format>
4-
#include <dpp/DPP_SilenceWarnings.h>
54
#include <dpp/dpp.h>
65
#include "Common/Cpp/Concurrency/ScheduledTaskRunner.h"
76
#include "CommonFramework/Globals.h"

SerialPrograms/Source/Integrations/DppIntegration/DppUtility.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#ifdef PA_DPP
22

3-
#include <dpp/DPP_SilenceWarnings.h>
43
#include <dpp/dpp.h>
54
#include <Integrations/DppIntegration/DppUtility.h>
65
#include "CommonFramework/GlobalSettingsPanel.h"

SerialPrograms/Source/ML/Programs/ML_LabelImages.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void LabelImages::load_image_related_data(const std::string& image_path, size_t
251251
return; // no embedding, then no way for us to annotate
252252
}
253253
// see if we can load the previously created labels
254-
const std::string anno_filename = std::filesystem::path(image_path).filename().replace_extension(".json");
254+
const std::string anno_filename = std::filesystem::path(image_path).filename().replace_extension(".json").string();
255255

256256
// ensure the folder exists
257257
std::filesystem::create_directory(ML_ANNOTATION_PATH());
@@ -284,7 +284,7 @@ void LabelImages::load_image_related_data(const std::string& image_path, size_t
284284
try{
285285
ObjectAnnotation anno_obj = json_to_object_annotation((*json_array)[i]);
286286
m_annotated_objects.emplace_back(std::move(anno_obj));
287-
} catch(JsonParseException & e){
287+
} catch([[maybe_unused]] JsonParseException & e){
288288
m_fail_to_load_annotation_file = true;
289289
QMessageBox box;
290290
box.warning(nullptr, "Unable to Load Annotation",

0 commit comments

Comments
 (0)