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

cppcheck fixes for queued LTR backports branch #59102

Merged

Commits on Oct 16, 2024

  1. Avoid some false-positive cppcheck functionConst warnings

    (cherry picked from commit 2b3be20)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    dca6509 View commit details
    Browse the repository at this point in the history
  2. Rename private method to sensible name

    (cherry picked from commit a7829b7)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    0bb4c3c View commit details
    Browse the repository at this point in the history
  3. Remove unused legacy pal class

    (cherry picked from commit 6935c02)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    7688da8 View commit details
    Browse the repository at this point in the history
  4. Fix cppcheck 'function can be const' warnings

    (cherry picked from commit 5c5bbf6)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    7056565 View commit details
    Browse the repository at this point in the history
  5. Const

    (cherry picked from commit 249b906)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    339c624 View commit details
    Browse the repository at this point in the history
  6. Add docs

    (cherry picked from commit e03072a)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    9581fac View commit details
    Browse the repository at this point in the history
  7. Define macros for cppcheck

    (cherry picked from commit fc82d4c)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    2f20624 View commit details
    Browse the repository at this point in the history
  8. Avoid some cppcheck false positives

    (cherry picked from commit 53a19ca)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    e562b8b View commit details
    Browse the repository at this point in the history
  9. Fix some (false positive) cppcheck uninitialized variable warnings

    (cherry picked from commit b92abc9)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    bc05d70 View commit details
    Browse the repository at this point in the history
  10. Uninitialized member fixes

    (cherry picked from commit 3c2ed21)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    20e4b0b View commit details
    Browse the repository at this point in the history
  11. Remove duplicate methods defined in subclasses

    (cherry picked from commit ff9eeb8)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    ac887ee View commit details
    Browse the repository at this point in the history
  12. Remove duplicate inherited members

    (cherry picked from commit dcb7823)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    151e655 View commit details
    Browse the repository at this point in the history
  13. Fix ignored release value warning

    (cherry picked from commit 0fd2191)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    7470ede View commit details
    Browse the repository at this point in the history
  14. Suppress some duplInheritedMember warnings

    (cherry picked from commit 5fc6ceb)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    3d6b3f6 View commit details
    Browse the repository at this point in the history
  15. Avoid false-positive cppcheck missingMemberCopy warnings

    (cherry picked from commit b200765)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    6a3e0ab View commit details
    Browse the repository at this point in the history
  16. Suppress cppcheck warning

    (cherry picked from commit 5cfcff1)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    407697a View commit details
    Browse the repository at this point in the history
  17. Remove broken swap methods, replace with standard assignment op

    which correctly sets all members
    
    (cherry picked from commit bec114f)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    8ab81c0 View commit details
    Browse the repository at this point in the history
  18. Fix/suppress more duplInheritedMember warnings

    (cherry picked from commit 4e6fe9b)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    2e10110 View commit details
    Browse the repository at this point in the history
  19. Fix assert with side effects warning

    (cherry picked from commit b9a3e8c)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    cc16cc3 View commit details
    Browse the repository at this point in the history
  20. Fix out of bound access

    (cherry picked from commit afb38d8)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    11482df View commit details
    Browse the repository at this point in the history
  21. Suppress some possibly valid cppcheck copy member warnings

    Add TODO for someone to validate later
    
    (cherry picked from commit 2251daf)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    8466306 View commit details
    Browse the repository at this point in the history
  22. Fix unused return value warning

    (cherry picked from commit a8023f8)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    9766bf8 View commit details
    Browse the repository at this point in the history
  23. Suppress more duplInheritedMember warnings

    (cherry picked from commit 417f94f)
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    d7fd4e8 View commit details
    Browse the repository at this point in the history
  24. Fix nullptr connection

    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    0320519 View commit details
    Browse the repository at this point in the history
  25. Suppress warnings

    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    02d4f0f View commit details
    Browse the repository at this point in the history
  26. qgsgeometrycollection: Remove uneeded clearCache call in operator=

    Indeed `QgsAbstractGeometry::operator=()` is already called. This
    operator calls the `clear()` method which already clears the cache and
    the existing geometries.
    
    (cherry picked from commit 9fed0f1)
    ptitjano authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    02c9cb6 View commit details
    Browse the repository at this point in the history
  27. Mark method as const

    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    2beea60 View commit details
    Browse the repository at this point in the history
  28. qgscompoundcurve: Remove uneeded clearCache call in operator=

    Indeed `QgsCurve::operator=()` is already called. As,
    `QgsCurve` does not override `operator=`,
    `QgsAbstractGeometry::operator=()` is called. This operator calls the
    `clear()` method which already clears the cache and the existing
    curves.
    
    (cherry picked from commit 04b1dd7)
    ptitjano authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    c1eabbf View commit details
    Browse the repository at this point in the history
  29. qgscurvepolygon: Remove uneeded clearCache call in operator=

    Indeed `QgsSurface::operator=()` is already called. As,
    `QgsSurface` does not override `operator=`,
    `QgsAbstractGeometry::operator=()` is called. This operator calls the
    `clear()` method which clears the exterior ring, the interior rings
    and the cache.
    
    (cherry picked from commit e450947)
    ptitjano authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    a71365c View commit details
    Browse the repository at this point in the history
  30. Remove duplicate equality operator for QgsPointXY

    We had two different(!!!!) implementations for equality operator
    for QgsPointXY, with different logic (one handled empty points,
    the other didn't). This compiled only because one was not marked
    as const. So we'd get a DIFFERENT equality check logic depending
    on whether or not the first point was const... eeek!
    
    Remove the duplicate one, mark the better one as const
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    b989a6b View commit details
    Browse the repository at this point in the history
  31. Fix build

    I'm not 100% sure if the point == mSnapMatch.point() comparison was
    intended be done using QgsPointXY or QgsPoint objects here!
    
    Use QgsPointXY to keep the behavior the same from
    before the duplicate QgsPointXY == operator was removed...
    nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    6e66a18 View commit details
    Browse the repository at this point in the history
  32. fix layout

    3nids authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    ece8b84 View commit details
    Browse the repository at this point in the history
  33. sipify

    3nids authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    191b95f View commit details
    Browse the repository at this point in the history
  34. const

    3nids authored and nyalldawson committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    eac800a View commit details
    Browse the repository at this point in the history