Exempt EPICS libraries from -Weffc++
Some checks failed
Test And Build / Build (push) Failing after 6s
Test And Build / Lint (push) Successful in 26s

This commit is contained in:
2025-09-17 12:33:58 +02:00
parent 902b18d038
commit 6dc2b131f7
4 changed files with 74 additions and 62 deletions

View File

@@ -5,8 +5,15 @@
#define DefaultMaxRepetitions 4
#include <asynDriver.h>
#include <macros.h>
// The EPICS libaries do not follow -Weffc++
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "asynDriver.h"
#include "macros.h"
#pragma GCC diagnostic pop
#include <string.h>
#include <string>
#include <unordered_map>
@@ -18,6 +25,17 @@
*/
class HIDDEN msgPrintControlKey {
public:
msgPrintControlKey(char *controller_, int axisNo, const char *fileName,
int line, size_t maxRepetitions = DefaultMaxRepetitions);
bool operator==(const msgPrintControlKey &other) const {
return axisNo_ == other.axisNo_ && line_ == other.line_ &&
functionName_ == other.functionName_ &&
controller_ == other.controller_;
}
void format(char *buffer, size_t bufferSize);
std::string controller_;
// -1 indicates a non-axis specific message
@@ -32,17 +50,6 @@ class HIDDEN msgPrintControlKey {
*
*/
size_t maxRepetitions_;
msgPrintControlKey(char *controller_, int axisNo, const char *fileName,
int line, size_t maxRepetitions = DefaultMaxRepetitions);
bool operator==(const msgPrintControlKey &other) const {
return axisNo_ == other.axisNo_ && line_ == other.line_ &&
functionName_ == other.functionName_ &&
controller_ == other.controller_;
}
void format(char *buffer, size_t bufferSize);
};
/**
@@ -85,6 +92,12 @@ template <> struct hash<msgPrintControlKey> {
*/
class HIDDEN msgPrintControl {
public:
/**
* @brief Construct a new msgPrintControl object
*
*/
msgPrintControl();
/**
* @brief Destroy the msgPrintControl object
*