Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further fixes for Clang-Tidy warnings (2). #137

Merged
merged 7 commits into from
May 14, 2024

Conversation

cristian64
Copy link
Collaborator

Follows #125 and #132.

These are the last warnings that Clang-Tidy (v18) reports.

A number of warning types have been suppressed, as they are not totally helpful and addressing them may leave the code in a more error-prone state.

At this time, no linting/checking has been added in the form of a GitHub Action. After some more local testing by devs, automatic linting/checking could be added; perhaps only to touched files, as Clang-Tidy can be slow.

The warnings were:

```
/w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:99:53: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
   99 |                            .arg(Common::MEM1_START, Common::GetMEM1End() - 1);
      |                                                     ^
/w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:102:71: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  102 |           tr(" or between 0x%08X and 0x%08X").arg(Common::MEM2_START, Common::GetMEM2End() - 1));
      |                                                                       ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:92:38: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
   92 |     verticalScrollBar()->setRange(0, ((m_memViewEnd - m_memViewStart) / m_numColumns) - m_numRows);
      |                                      ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:146:35: warning: narrowing conversion from 'unsigned int' to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  146 |     verticalScrollBar()->setValue(((address & 0xFFFFFFF0) - m_memViewStart) / m_numColumns);
      |                                   ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:170:36: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  170 |   verticalScrollBar()->setRange(0, ((m_memViewEnd - m_memViewStart) / m_numColumns) - m_numRows);
      |                                    ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:727:21: warning: narrowing conversion from 'int' to signed type 'char' is implementation-defined [bugprone-narrowing-conversions]
  727 |       byteToWrite = (selectedMemoryValue & static_cast<char>(0xF0)) | byteToWrite;
      |                     ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:730:11: warning: narrowing conversion from 'int' to signed type 'char' is implementation-defined [bugprone-narrowing-conversions]
  730 |           (selectedMemoryValue & static_cast<char>(0x0F)) | static_cast<char>(byteToWrite << 4);
      |           ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:852:16: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  852 |     int byte = (m_currentFirstAddress + i) & 0xF;
      |                ^
/w/dolphin-memory-engine/Source/GUI/Settings/DlgSettings.cpp:160:27: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  160 |   m_sldMEM1Size->setValue(SConfig::getInstance().getMEM1Size() / 1024 / 1024);
      |                           ^
/w/dolphin-memory-engine/Source/GUI/Settings/DlgSettings.cpp:161:27: warning: narrowing conversion from 'u32' (aka 'unsigned int') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
  161 |   m_sldMEM2Size->setValue(SConfig::getInstance().getMEM2Size() / 1024 / 1024);
      |                           ^
```
The solution to these warnings often damages readability.
The warnings were:

```
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:9:7: warning: class 'CheatEngineParser' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
    9 | class CheatEngineParser
      |       ^
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:10:7: warning: class 'IDolphinProcess' defines a default destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   10 | class IDolphinProcess
      |       ^
/w/dolphin-memory-engine/Source/GUI/MainWindow.h:17:7: warning: class 'MainWindow' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   17 | class MainWindow : public QMainWindow
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.h:14:7: warning: class 'DlgCopy' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   14 | class DlgCopy : public QDialog
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemScanner/MemScanWidget.h:17:7: warning: class 'MemScanWidget' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   17 | class MemScanWidget : public QWidget
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemScanner/ResultsListModel.h:7:7: warning: class 'ResultsListModel' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
    7 | class ResultsListModel : public QAbstractTableModel
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:16:7: warning: class 'MemViewer' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   16 | class MemViewer : public QAbstractScrollArea
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewerWidget.h:9:7: warning: class 'MemViewerWidget' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
    9 | class MemViewerWidget : public QWidget
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemWatcher/Dialogs/DlgAddWatchEntry.h:16:7: warning: class 'DlgAddWatchEntry' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   16 | class DlgAddWatchEntry : public QDialog
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.h:10:7: warning: class 'MemWatchModel' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   10 | class MemWatchModel : public QAbstractItemModel
      |       ^
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchWidget.h:10:7: warning: class 'MemWatchWidget' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   10 | class MemWatchWidget : public QWidget
      |       ^
/w/dolphin-memory-engine/Source/GUI/Settings/DlgSettings.h:11:7: warning: class 'DlgSettings' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   11 | class DlgSettings : public QDialog
      |       ^
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:11:7: warning: class 'SConfig' defines a destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [hicpp-special-member-functions]
   11 | class SConfig
      |       ^
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:15:7: warning: class 'MemScanner' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   15 | class MemScanner
      |       ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:11:7: warning: class 'MemWatchEntry' defines a destructor but does not define a copy constructor, a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
   11 | class MemWatchEntry
      |       ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.h:9:7: warning: class 'MemWatchTreeNode' defines a destructor and a copy constructor but does not define a copy assignment operator, a move constructor or a move assignment operator [hicpp-special-member-functions]
    9 | class MemWatchTreeNode
      |       ^
```
None of `simplifySelection()`'s callers were freeing the memory returned
by the function. The function now returns a self-managed object that is
placed in the stack.
The warnings were:

```
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp:116:41: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  116 |     std::istringstream conversionStream(directoryEntry->d_name);
      |                                         ^
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp:122:46: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  122 |     aCmdLineFile.open("/proc/" + std::string(directoryEntry->d_name) + "/comm");
      |                                              ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:200:13: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  200 |             addressBuffer, sizeof(u32), true))
      |             ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:202:29: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  202 |       std::memcpy(&address, addressBuffer, sizeof(u32));
      |                             ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:240:15: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  240 |               realConsoleAddressBuffer, sizeof(u32), true))
      |               ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:242:42: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  242 |         std::memcpy(&realConsoleAddress, realConsoleAddressBuffer, sizeof(u32));
      |                                          ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:285:15: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  285 |               realConsoleAddressBuffer, sizeof(u32), true))
      |               ^
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:287:42: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [hicpp-no-array-decay]
  287 |         std::memcpy(&realConsoleAddress, realConsoleAddressBuffer, sizeof(u32));
      |                                          ^
```
For this application, reducing the size of the few enumerations will not
have any notable difference, and could be error prone or make
maintenance harder.
The warnings were:

```
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:23:60: warning: parameter 'useDolphinPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   23 |   MemWatchTreeNode* parseCTFile(QIODevice* CTFileIODevice, const bool useDolphinPointer);
      |                                                            ^~~~~
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:41:65: warning: parameter 'useDolphinPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   41 |   MemWatchTreeNode* parseCheatTable(MemWatchTreeNode* rootNode, const bool useDolphinPointer);
      |                                                                 ^~~~~
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:42:63: warning: parameter 'useDolphinPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   42 |   MemWatchTreeNode* parseCheatEntries(MemWatchTreeNode* node, const bool useDolphinPointer);
      |                                                               ^~~~~
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:43:48: warning: parameter 'useDolphinPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   43 |   void parseCheatEntry(MemWatchTreeNode* node, const bool useDolphinPointer);
      |                                                ^~~~~
/w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.h:45:52: warning: parameter 'useDolphinPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   45 |                                      bool isGroup, const bool useDolphinPointer);
      |                                                    ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:57:23: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   57 | size_t getSizeForType(const MemType type, const size_t length);
      |                       ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:57:43: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   57 | size_t getSizeForType(const MemType type, const size_t length);
      |                                           ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:58:30: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   58 | bool shouldBeBSwappedForType(const MemType type);
      |                              ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:59:33: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   59 | int getNbrBytesAlignmentForType(const MemType type);
      |                                 ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:62:54: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   62 | std::string formatMemoryToString(const char* memory, const MemType type, const size_t length,
      |                                                      ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:62:74: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   62 | std::string formatMemoryToString(const char* memory, const MemType type, const size_t length,
      |                                                                          ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:63:34: warning: parameter 'base' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   63 |                                  const MemBase base, const bool isUnsigned,
      |                                  ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:63:54: warning: parameter 'isUnsigned' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   63 |                                  const MemBase base, const bool isUnsigned,
      |                                                      ^~~~~
/w/dolphin-memory-engine/Source/Common/MemoryCommon.h:64:34: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   64 |                                  const bool withBSwap = false);
      |                                  ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:25:27: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   25 |   static bool readFromRAM(const u32 offset, char* buffer, const size_t size, const bool withBSwap);
      |                           ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:25:59: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   25 |   static bool readFromRAM(const u32 offset, char* buffer, const size_t size, const bool withBSwap);
      |                                                           ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:25:78: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   25 |   static bool readFromRAM(const u32 offset, char* buffer, const size_t size, const bool withBSwap);
      |                                                                              ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:26:26: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   26 |   static bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                          ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:26:64: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   26 |   static bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                                                                ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:27:26: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   27 |                          const bool withBSwap);
      |                          ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:36:50: warning: parameter 'ramIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   36 |   static std::string getFormattedValueFromMemory(const u32 ramIndex, Common::MemType memType,
      |                                                  ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/DolphinAccessor.h:39:37: warning: parameter 'address' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   39 |   static bool isValidConsoleAddress(const u32 address);
      |                                     ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:23:28: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   23 |   virtual bool readFromRAM(const u32 offset, char* buffer, const size_t size,
      |                            ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:23:60: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   23 |   virtual bool readFromRAM(const u32 offset, char* buffer, const size_t size,
      |                                                            ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:24:28: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   24 |                            const bool withBSwap) = 0;
      |                            ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:25:27: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   25 |   virtual bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                           ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:25:65: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   25 |   virtual bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                                                                 ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:26:27: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   26 |                           const bool withBSwap) = 0;
      |                           ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:19:20: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   19 |   bool readFromRAM(const u32 offset, char* buffer, size_t size, const bool withBSwap) override;
      |                    ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:19:65: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   19 |   bool readFromRAM(const u32 offset, char* buffer, size_t size, const bool withBSwap) override;
      |                                                                 ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:20:19: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   20 |   bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                   ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:20:57: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   20 |   bool writeToRAM(const u32 offset, const char* buffer, const size_t size,
      |                                                         ^~~~~
/w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:21:19: warning: parameter 'withBSwap' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   21 |                   const bool withBSwap) override;
      |                   ^~~~~
/w/dolphin-memory-engine/Source/GUI/GUICommon.h:14:27: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   14 | QString getStringFromType(const Common::MemType type, const size_t length = 0);
      |                           ^~~~~
/w/dolphin-memory-engine/Source/GUI/GUICommon.h:14:55: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   14 | QString getStringFromType(const Common::MemType type, const size_t length = 0);
      |                                                       ^~~~~
/w/dolphin-memory-engine/Source/GUI/GUICommon.h:15:25: warning: parameter 'base' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   15 | QString getNameFromBase(const Common::MemBase base);
      |                         ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemScanner/MemScanWidget.h:38:28: warning: parameter 'errorCode' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   38 |   void handleScannerErrors(const Common::MemOperationReturnCode errorCode);
      |                            ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemScanner/ResultsListModel.h:34:24: warning: parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   34 |   u32 getResultAddress(const int row) const;
      |                        ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:38:22: warning: parameter 'address' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   38 |   void jumpToAddress(const u32 address);
      |                      ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:40:30: warning: parameter 'valid' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   40 |   void memoryValidityChanged(const bool valid);
      |                              ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:77:29: warning: parameter 'key' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   77 |   bool handleNaviguationKey(const int key, bool shiftIsHeld);
      |                             ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:80:27: warning: parameter 'region' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   80 |   void changeMemoryRegion(const MemoryRegion region);
      |                           ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:84:40: warning: parameter 'rowIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   84 |   void renderMemory(QPainter& painter, const int rowIndex, const int columnIndex);
      |                                        ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:84:60: warning: parameter 'columnIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   84 |   void renderMemory(QPainter& painter, const int rowIndex, const int columnIndex);
      |                                                            ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:85:41: warning: parameter 'rowIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   85 |   void renderHexByte(QPainter& painter, const int rowIndex, const int columnIndex, QColor& bgColor,
      |                                         ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:85:61: warning: parameter 'columnIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   85 |   void renderHexByte(QPainter& painter, const int rowIndex, const int columnIndex, QColor& bgColor,
      |                                                             ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:87:43: warning: parameter 'rowIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   87 |   void renderASCIIText(QPainter& painter, const int rowIndex, const int columnIndex,
      |                                           ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:87:63: warning: parameter 'columnIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   87 |   void renderASCIIText(QPainter& painter, const int rowIndex, const int columnIndex,
      |                                                               ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:89:40: warning: parameter 'rowIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   89 |   void renderCarret(QPainter& painter, const int rowIndex, const int columnIndex);
      |                                        ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:89:60: warning: parameter 'columnIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   89 |   void renderCarret(QPainter& painter, const int rowIndex, const int columnIndex);
      |                                                            ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:90:44: warning: parameter 'rowIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   90 |   void determineMemoryTextRenderProperties(const int rowIndex, const int columnIndex,
      |                                            ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.h:90:64: warning: parameter 'columnIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   90 |   void determineMemoryTextRenderProperties(const int rowIndex, const int columnIndex,
      |                                                                ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/Dialogs/DlgChangeType.h:12:34: warning: parameter 'typeIndex' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   12 |   DlgChangeType(QWidget* parent, const int typeIndex, const size_t length);
      |                                  ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/Dialogs/DlgChangeType.h:12:55: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   12 |   DlgChangeType(QWidget* parent, const int typeIndex, const size_t length);
      |                                                       ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.h:55:45: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   55 |   void changeType(const QModelIndex& index, const Common::MemType type, const size_t length);
      |                                             ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.h:55:73: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   55 |   void changeType(const QModelIndex& index, const Common::MemType type, const size_t length);
      |                                                                         ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.h:82:33: warning: parameter 'readSucess' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   82 |                                 const bool readSucess = true);
      |                                 ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.h:84:33: warning: parameter 'writeSucess' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   84 |                                 const bool writeSucess = true);
      |                                 ^~~~~
/w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchWidget.h:67:30: warning: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   67 |   bool isAnyAncestorSelected(const QModelIndex index) const;
      |                              ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:52:17: warning: parameter 'theme' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   52 |   void setTheme(const int theme);
      |                 ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:54:32: warning: parameter 'watcherUpdateTimerMs' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   54 |   void setWatcherUpdateTimerMs(const int watcherUpdateTimerMs);
      |                                ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:55:25: warning: parameter 'freezeTimerMs' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   55 |   void setFreezeTimerMs(const int freezeTimerMs);
      |                         ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:56:32: warning: parameter 'scannerUpdateTimerMs' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   56 |   void setScannerUpdateTimerMs(const int scannerUpdateTimerMs);
      |                                ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:57:31: warning: parameter 'viewerUpdateTimerMs' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   57 |   void setViewerUpdateTimerMs(const int viewerUpdateTimerMs);
      |                               ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:59:20: warning: parameter 'mem1SizeReal' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   59 |   void setMEM1Size(const u32 mem1SizeReal);
      |                    ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:60:20: warning: parameter 'mem2SizeReal' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   60 |   void setMEM2Size(const u32 mem2SizeReal);
      |                    ^~~~~
/w/dolphin-memory-engine/Source/GUI/Settings/SConfig.h:62:35: warning: parameter 'viewerNbrBytesSeparator' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   62 |   void setViewerNbrBytesSeparator(const int viewerNbrBytesSeparator);
      |                                   ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:49:44: warning: parameter 'filter' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   49 |   Common::MemOperationReturnCode firstScan(const ScanFiter filter, const std::string& searchTerm1,
      |                                            ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:51:43: warning: parameter 'filter' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   51 |   Common::MemOperationReturnCode nextScan(const ScanFiter filter, const std::string& searchTerm1,
      |                                           ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:139:16: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  139 |   void setType(const Common::MemType type);
      |                ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:140:16: warning: parameter 'base' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  140 |   void setBase(const Common::MemBase base);
      |                ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:141:31: warning: parameter 'enforceAlignment' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  141 |   void setEnforceMemAlignment(const bool enforceAlignment);
      |                               ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:142:20: warning: parameter 'isSigned' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  142 |   void setIsSigned(const bool isSigned);
      |                    ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:157:42: warning: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  157 |   std::string getFormattedScannedValueAt(const int index) const;
      |                                          ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:164:29: warning: parameter 'filter' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  164 |   inline bool isHitNextScan(const ScanFiter filter, const char* memoryToCompare1,
      |                             ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:166:56: warning: parameter 'realSize' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  166 |                             const char* newerRAMCache, const size_t realSize,
      |                                                        ^~~~~
/w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:167:29: warning: parameter 'consoleOffset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
  167 |                             const u32 consoleOffset) const;
      |                             ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:35:24: warning: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   35 |   int getPointerOffset(const int index) const;
      |                        ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:39:26: warning: parameter 'address' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   39 |   void setConsoleAddress(const u32 address);
      |                          ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:40:25: warning: parameter 'type' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   40 |   void setTypeAndLength(const Common::MemType type, const size_t length = 1);
      |                         ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:40:53: warning: parameter 'length' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   40 |   void setTypeAndLength(const Common::MemType type, const size_t length = 1);
      |                                                     ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:41:16: warning: parameter 'base' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   41 |   void setBase(const Common::MemBase base);
      |                ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:42:16: warning: parameter 'doLock' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   42 |   void setLock(const bool doLock);
      |                ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:43:26: warning: parameter 'isUnsigned' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   43 |   void setSignedUnsigned(const bool isUnsigned);
      |                          ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:44:26: warning: parameter 'boundToPointer' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   44 |   void setBoundToPointer(const bool boundToPointer);
      |                          ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:45:25: warning: parameter 'pointerOffset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   45 |   void setPointerOffset(const int pointerOffset, const int index);
      |                         ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:45:50: warning: parameter 'index' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   45 |   void setPointerOffset(const int pointerOffset, const int index);
      |                                                  ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:46:18: warning: parameter 'offset' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   46 |   void addOffset(const int offset);
      |                  ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:51:33: warning: parameter 'level' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   51 |   u32 getAddressForPointerLevel(const int level) const;
      |                                 ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:52:47: warning: parameter 'level' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   52 |   std::string getAddressStringForPointerLevel(const int level) const;
      |                                               ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.h:59:71: warning: parameter 'size' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   59 |   Common::MemOperationReturnCode writeMemoryToRAM(const char* memory, const size_t size);
      |                                                                       ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.h:33:24: warning: parameter 'valueEditing' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   33 |   void setValueEditing(const bool valueEditing);
      |                        ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.h:36:20: warning: parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   36 |   void insertChild(const int row, MemWatchTreeNode* node);
      |                    ^~~~~
/w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.h:37:20: warning: parameter 'row' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
   37 |   void removeChild(const int row);
      |                    ^~~~~
```
@dreamsyntax dreamsyntax merged commit 4c94370 into aldelaro5:master May 14, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants