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

Add Clang-Tidy configuration file + a some fixes. #125

Merged
merged 25 commits into from
May 5, 2024

Commits on May 4, 2024

  1. Enable compilation database generation in CMake file.

    `CMAKE_EXPORT_COMPILE_COMMANDS` is now enabled. Supported generators
    (e.g. Ninja or Makefile) will now produce a `compile_commands.json`
    file in the build directory.
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    44f33b2 View commit details
    Browse the repository at this point in the history
  2. Add Clang-Tidy configuration file.

    The check list has been manually crafted for the Dolphin Memory Engine
    project. Checks that are generally not worth fixing have been disabled,
    but it is possible there are more checks that could be disabled; devs
    are encouraged to disable them when the time comes.
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    40cefd2 View commit details
    Browse the repository at this point in the history
  3. Address bugprone-integer-division warnings.

    Warning was:
    ```
    /w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:918:9: warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division]
      918 |         (1000 - (m_elapsedTimer.elapsed() -
          |         ^
    /w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:920:10: warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division]
      920 |         (1000 / 100);
          |          ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    98283d2 View commit details
    Browse the repository at this point in the history
  4. Address bugprone-multi-level-implicit-pointer-conversion warnings.

    The warnings were:
    ```
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:432:34: warning: multilevel pointer conversion from 'MemWatchTreeNode **' to 'const void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion]
      432 |   std::memcpy(&leastDeepPointer, &leastDeepNode, sizeof(MemWatchTreeNode*));
          |                                  ^
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:438:27: warning: multilevel pointer conversion from 'MemWatchTreeNode **' to 'const void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion]
      438 |     std::memcpy(&pointer, &node, sizeof(node));
          |                           ^
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:462:15: warning: multilevel pointer conversion from 'MemWatchTreeNode **' to 'void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion]
      462 |   std::memcpy(&leastDeepNode, &leastDeepNodePtr, sizeof(leastDeepNodePtr));
          |               ^
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:489:17: warning: multilevel pointer conversion from 'MemWatchTreeNode **' to 'void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion]
      489 |     std::memcpy(&srcNode, &nodePtr, sizeof(nodePtr));
          |                 ^
    ```
    
    The bitwise casts are now applied via `std::bit_cast`.
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    126a833 View commit details
    Browse the repository at this point in the history
  5. Address bugprone-signed-char-misuse warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:954:24: warning: 'signed char' to 'int' conversion; consider casting to 'unsigned char' first. [bugprone-signed-char-misuse]
      954 |   int asciiByte = (int)asciiStr[0];
          |                        ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    fd9362b View commit details
    Browse the repository at this point in the history
  6. Address bugprone-unused-local-non-trivial-variable warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.cpp:42:17: warning: unused local variable 'test' of type 'std::string' (aka 'basic_string<char>') [bugprone-unused-local-non-trivial-variable]
       42 |     std::string test = m_xmlReader->name().toString().toStdString();
          |                 ^
    /w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.cpp:74:19: warning: unused local variable 'test' of type 'std::string' (aka 'basic_string<char>') [bugprone-unused-local-non-trivial-variable]
       74 |       std::string test = m_xmlReader->name().toString().toStdString();
          |                   ^
    /w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.cpp:98:19: warning: unused local variable 'test' of type 'std::string' (aka 'basic_string<char>') [bugprone-unused-local-non-trivial-variable]
       98 |       std::string test = m_xmlReader->name().toString().toStdString();
          |                   ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:421:25: warning: unused local variable 'byteStream' of type 'std::stringstream' (aka 'basic_stringstream<char>') [bugprone-unused-local-non-trivial-variable]
      421 |       std::stringstream byteStream(i);
          |                         ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    8a18f34 View commit details
    Browse the repository at this point in the history
  7. Address google-readability-casting warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp:166:21: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting]
      166 |   remote.iov_base = (void*)RAMAddress;
          |                     ^
    /w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp:235:21: warning: C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast [google-readability-casting]
      235 |   remote.iov_base = (void*)RAMAddress;
          |                     ^
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:159:23: warning: C-style casts are discouraged; use static_cast [google-readability-casting]
      159 |                       (DlgCopy::ByteStringFormats)m_cmbViewerBytesSeparator->currentIndex())));
          |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                       static_cast<DlgCopy::ByteStringFormats>(                             )
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:221:12: warning: C-style casts are discouraged; use static_cast [google-readability-casting]
      221 |   output = (u32)u;
          |            ^~~~~
          |            static_cast<u32>( )
    /w/dolphin-memory-engine/Source/GUI/MemViewer/MemViewer.cpp:733:75: warning: C-style casts are discouraged; use static_cast [google-readability-casting]
      733 |   u32 offsetToWrite = Common::dolphinAddrToOffset(m_currentFirstAddress + (u32)memoryOffset,
          |                                                                           ^~~~~
          |                                                                           static_cast<u32>()
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    df1d84c View commit details
    Browse the repository at this point in the history
  8. Address google-runtime-int warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:160:7: warning: consider replacing 'unsigned long long' with 'uint64' [google-runtime-int]
      160 |       unsigned long long input = 0;
          |       ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:198:7: warning: consider replacing 'unsigned long long' with 'uint64' [google-runtime-int]
      198 |       unsigned long long input = 0;
          |       ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:234:7: warning: consider replacing 'unsigned long long' with 'uint64' [google-runtime-int]
      234 |       unsigned long long input = 0;
          |       ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:272:9: warning: consider replacing 'unsigned long long' with 'uint64' [google-runtime-int]
      272 |         unsigned long long input = 0;
          |         ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:325:9: warning: consider replacing 'unsigned long long' with 'uint64' [google-runtime-int]
      325 |         unsigned long long input = 0;
          |         ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    3bb5aa2 View commit details
    Browse the repository at this point in the history
  9. Address hicpp-use-equals-default warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/DolphinProcess/IDolphinProcess.h:13:11: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default]
       13 |   virtual ~IDolphinProcess() {}
          |           ^                  ~~
          |                              = default;
    /w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.h:16:3: warning: use '= default' to define a trivial default constructor [hicpp-use-equals-default]
       16 |   LinuxDolphinProcess() {}
          |   ^                     ~~
          |                         = default;
    /w/dolphin-memory-engine/Source/GUI/MemScanner/ResultsListModel.cpp:8:19: warning: use '= default' to define a trivial destructor [hicpp-use-equals-default]
        8 | ResultsListModel::~ResultsListModel()
          |                   ^
        9 | {
          | ~
          | = default;
       10 | }
          | ~
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    243c639 View commit details
    Browse the repository at this point in the history
  10. Address hicpp-use-nullptr warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/Dialogs/DlgAddWatchEntry.cpp:188:22: warning: use nullptr [hicpp-use-nullptr]
      188 |   txbOffset->setText(0);
          |                      ^
          |                      nullptr
    ```
    
    `0`, which was equivalent to `nullptr`, was being used to implicitly
    construct an empty `QString` that was then passed to `setText()`, which
    would do nothing.
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    be734e8 View commit details
    Browse the repository at this point in the history
  11. Address misc-redundant-expression warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:116:19: warning: both sides of operator are equivalent [misc-redundant-expression]
      116 |     if (firstByte != firstByte)
          |                   ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    5a671d8 View commit details
    Browse the repository at this point in the history
  12. Address misc-throw-by-value-catch-by-reference warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:165:14: warning: catch handler catches by value; should catch by reference instead [misc-throw-by-value-catch-by-reference]
      165 |       catch (std::invalid_argument)
          |              ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:203:14: warning: catch handler catches by value; should catch by reference instead [misc-throw-by-value-catch-by-reference]
      203 |       catch (std::invalid_argument)
          |              ^
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:239:14: warning: catch handler catches by value; should catch by reference instead [misc-throw-by-value-catch-by-reference]
      239 |       catch (std::invalid_argument)
          |              ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    1e56ded View commit details
    Browse the repository at this point in the history
  13. Address modernize-pass-by-value warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.cpp:10:56: warning: pass by value and use std::move [modernize-pass-by-value]
        6 |
        7 | #include "../GUI/GUICommon.h"
        8 |
        9 | MemWatchTreeNode::MemWatchTreeNode(MemWatchEntry* entry, MemWatchTreeNode* parent,
       10 |                                    const bool isGroup, const QString& groupName)
          |                                                        ^~~~~~~~~~~~~~
          |                                                        QString
       11 |     : m_entry(entry), m_parent(parent), m_isGroup(isGroup), m_groupName(groupName)
          |
          |                                                                         std::move( )
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    a8af60f View commit details
    Browse the repository at this point in the history
  14. Address modernize-use-using warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:5:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
        5 | typedef uint64_t u64;
          | ^~~~~~~~~~~~~~~~~~~~
          | using u64 = uint64_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:6:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
        6 | typedef uint32_t u32;
          | ^~~~~~~~~~~~~~~~~~~~
          | using u32 = uint32_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:7:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
        7 | typedef uint16_t u16;
          | ^~~~~~~~~~~~~~~~~~~~
          | using u16 = uint16_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:8:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
        8 | typedef uint8_t u8;
          | ^~~~~~~~~~~~~~~~~~
          | using u8 = uint8_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:10:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
       10 | typedef int64_t s64;
          | ^~~~~~~~~~~~~~~~~~~
          | using s64 = int64_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:11:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
       11 | typedef int32_t s32;
          | ^~~~~~~~~~~~~~~~~~~
          | using s32 = int32_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:12:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
       12 | typedef int16_t s16;
          | ^~~~~~~~~~~~~~~~~~~
          | using s16 = int16_t
    /w/dolphin-memory-engine/Source/Common/CommonTypes.h:13:1: warning: use 'using' instead of 'typedef' [modernize-use-using]
       13 | typedef int8_t s8;
          | ^~~~~~~~~~~~~~~~~
          | using s8 = int8_t
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    42254e9 View commit details
    Browse the repository at this point in the history
  15. Address performance-for-range-copy warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp:39:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
       39 |     for (auto str : lineData)
          |               ^
          |          const  &
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    825ee35 View commit details
    Browse the repository at this point in the history
  16. Address performance-unnecessary-value-param warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:127:46: warning: the const qualified parameter 'inputString' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
      127 |                            const std::string inputString, const MemBase base, const MemType type,
          |                                              ^
          |                                             &
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:180:42: warning: the parameter 'str' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
      180 | bool DlgCopy::hexStringToU32(std::string str, u32& output)
          |                                          ^
          |                              const      &
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:197:51: warning: the parameter 'str' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
      197 | bool DlgCopy::isUnsignedIntegerString(std::string str)
          |                                                   ^
          |                                       const      &
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:210:43: warning: the parameter 'str' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
      210 | bool DlgCopy::uintStringToU32(std::string str, u32& output)
          |                                           ^
          |                               const      &
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:400:72: warning: the const qualified parameter 'nodes' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
      400 | MemWatchModel::getLeastDeepNodeFromList(const QList<MemWatchTreeNode*> nodes) const
          |                                                                        ^
          |                                                                       &
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchEntry.cpp:13:44: warning: the const qualified parameter 'label' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
       13 | MemWatchEntry::MemWatchEntry(const QString label, const u32 consoleAddress,
          |                                            ^
          |                                           &
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.cpp:86:16: warning: parameter 'children' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]
        6 |   m_children = children;
          |                ^
          |                std::move( )
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    c5d61d3 View commit details
    Browse the repository at this point in the history
  17. Address readability-container-size-empty warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/Common/MemoryCommon.cpp:130:7: warning: the 'empty' method should be used to check for emptiness instead of 'length' [readability-container-size-empty]
      130 |   if (inputString.length() == 0)
          |       ^~~~~~~~~~~~~~~~~~~~~~~~~
          |       inputString.empty()
    /usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/bits/basic_string.h:1191:7: note: method 'basic_string'::empty() defined here
     1191 |       empty() const _GLIBCXX_NOEXCEPT
          |       ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    c32f48f View commit details
    Browse the repository at this point in the history
  18. Address readability-convert-member-functions-to-static warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/CheatEngineParser/CheatEngineParser.cpp:365:28: warning: method 'formatImportedEntryBasicInfo' can be made static [readability-convert-member-functions-to-static]
      365 | QString CheatEngineParser::formatImportedEntryBasicInfo(const MemWatchEntry* entry) const
          |                            ^                                                        ~~~~~
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:95:31: warning: method 'getEntryFromIndex' can be made static [readability-convert-member-functions-to-static]
       95 | MemWatchEntry* MemWatchModel::getEntryFromIndex(const QModelIndex& index) const
          |                               ^                                           ~~~~~
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:625:24: warning: method 'getAddressString' can be made static [readability-convert-member-functions-to-static]
      625 | QString MemWatchModel::getAddressString(const MemWatchEntry* entry) const
          |                        ^                                            ~~~~~
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:688:34: warning: method 'getTreeNodeFromIndex' can be made static [readability-convert-member-functions-to-static]
      688 | MemWatchTreeNode* MemWatchModel::getTreeNodeFromIndex(const QModelIndex& index) const
          |                                  ^                                              ~~~~~
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:476:17: warning: method 'getTermsNumForFilter' can be made static [readability-convert-member-functions-to-static]
      476 | int MemScanner::getTermsNumForFilter(const MemScanner::ScanFiter filter) const
          |                 ^                                                        ~~~~~
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:488:18: warning: method 'typeSupportsAdditionalOptions' can be made static [readability-convert-member-functions-to-static]
      488 | bool MemScanner::typeSupportsAdditionalOptions(const Common::MemType type) const
          |                  ^                                                         ~~~~~
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:526:25: warning: method 'addSpacesToBytesArrays' can be made static [readability-convert-member-functions-to-static]
      526 | std::string MemScanner::addSpacesToBytesArrays(const std::string& bytesArray) const
          |                         ^                                                     ~~~~~
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    2ed89f6 View commit details
    Browse the repository at this point in the history
  19. Address readability-inconsistent-declaration-parameter-name warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:132:8: warning: function 'MemScanner::setSearchRangeBegin' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
        132 |   bool setSearchRangeBegin(u32 beginIndex);
            |        ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:446:18: note: the definition seen here
        446 | bool MemScanner::setSearchRangeBegin(u32 beginRange)
            |                  ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:132:8: note: differing parameters are named here: ('beginIndex'), in definition: ('beginRange')
        132 |   bool setSearchRangeBegin(u32 beginIndex);
            |        ^                       ~~~~~~~~~~
            |                                beginRange
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:133:8: warning: function 'MemScanner::setSearchRangeEnd' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
        133 |   bool setSearchRangeEnd(u32 endIndex);
            |        ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:461:18: note: the definition seen here
        461 | bool MemScanner::setSearchRangeEnd(u32 endRange)
            |                  ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:133:8: note: differing parameters are named here: ('endIndex'), in definition: ('endRange')
        133 |   bool setSearchRangeEnd(u32 endIndex);
            |        ^                     ~~~~~~~~
            |                              endRange
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:134:8: warning: function 'MemScanner::setSearchRange' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
        134 |   bool setSearchRange(u32 beginIndex, u32 endIndex);
            |        ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:428:18: note: the definition seen here
        428 | bool MemScanner::setSearchRange(u32 beginRange, u32 endRange)
            |                  ^
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:134:8: note: differing parameters are named here: ('beginIndex', 'endIndex'), in definition: ('beginRange', 'endRange')
        134 |   bool setSearchRange(u32 beginIndex, u32 endIndex);
            |        ^                  ~~~~~~~~~~      ~~~~~~~~
            |                           beginRange      endRange
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    b826aa3 View commit details
    Browse the repository at this point in the history
  20. Address readability-non-const-parameter warnings.

    The one warning was:
    ```
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:225:44: warning: pointer parameter 'input' can be pointer to const [readability-non-const-parameter]
      225 | std::string DlgCopy::charToHexString(char* input, size_t count, DlgCopy::ByteStringFormats format)
          |                                            ^
          |                                      const
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    043012d View commit details
    Browse the repository at this point in the history
  21. Address readability-qualified-auto warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:60:10: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
       60 |     for (auto i : children)
          |          ^~~~
          |          auto *
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:84:10: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
       84 |     for (auto i : children)
          |          ^~~~
          |          auto *
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:424:8: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      424 |   for (auto i : nodes)
          |        ^~~~
          |        auto *
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchModel.cpp:634:8: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      634 |   for (auto i : parent->getChildren())
          |        ^~~~
          |        auto *
    /w/dolphin-memory-engine/Source/GUI/MemWatcher/MemWatchWidget.cpp:348:10: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      348 |     for (auto i : copiedRootNode->getChildren())
          |          ^~~~
          |          auto *
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.cpp:193:10: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      193 |     for (auto i : m_children)
          |          ^~~~
          |          auto *
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.cpp:206:12: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      206 |       for (auto i : m_children)
          |            ^~~~
          |            auto *
    /w/dolphin-memory-engine/Source/MemoryWatch/MemWatchTreeNode.cpp:247:10: warning: 'auto i' can be declared as 'auto *i' [readability-qualified-auto]
      247 |     for (auto i : m_children)
          |          ^~~~
          |          auto *
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    6bd459b View commit details
    Browse the repository at this point in the history
  22. Address readability-redundant-inline-specifier warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:53:3: warning: function 'convertMemoryToType' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
       53 |   inline T convertMemoryToType(const char* memory, bool invert) const
          |   ^~~~~~
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.h:63:3: warning: function 'compareMemoryAsNumbersWithType' has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]
       63 |   inline CompareResult compareMemoryAsNumbersWithType(const char* first, const char* second,
          |   ^~~~~~
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    ce3a310 View commit details
    Browse the repository at this point in the history
  23. Address readability-redundant-member-init warnings.

    The one warning was:
    
    ```
    /w/dolphin-memory-engine/Source/MemoryScanner/MemoryScanner.cpp:30:28: warning: initializer for member 'm_resultsConsoleAddr' is redundant [readability-redundant-member-init]
       30 | MemScanner::MemScanner() : m_resultsConsoleAddr(std::vector<u32>())
          |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    3a7fc4d View commit details
    Browse the repository at this point in the history
  24. Address readability-redundant-string-init warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:230:15: warning: redundant string initialization [readability-redundant-string-init]
      230 |   std::string beforeAll = "";
          |               ^~~~~~~~~~~~~~
          |               beforeAll
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:231:15: warning: redundant string initialization [readability-redundant-string-init]
      231 |   std::string beforeByte = "";
          |               ^~~~~~~~~~~~~~~
          |               beforeByte
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:232:15: warning: redundant string initialization [readability-redundant-string-init]
      232 |   std::string betweenBytes = "";
          |               ^~~~~~~~~~~~~~~~~
          |               betweenBytes
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:233:15: warning: redundant string initialization [readability-redundant-string-init]
      233 |   std::string afterAll = "";
          |               ^~~~~~~~~~~~~
          |               afterAll
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    b80ca3c View commit details
    Browse the repository at this point in the history
  25. Address readability-use-anyofallof warnings.

    The warnings were:
    
    ```
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:169:3: warning: replace loop by 'std::ranges::all_of()' [readability-use-anyofallof]
      169 |   for (char c : str)
          |   ^
    /w/dolphin-memory-engine/Source/GUI/MemCopy/DlgCopy.cpp:200:3: warning: replace loop by 'std::ranges::all_of()' [readability-use-anyofallof]
      200 |   for (char c : str)
          |   ^
    ```
    cristian64 committed May 4, 2024
    Configuration menu
    Copy the full SHA
    2272146 View commit details
    Browse the repository at this point in the history