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

some sonarlint cleanups #2286

Merged
merged 7 commits into from
Jul 27, 2022
Merged

some sonarlint cleanups #2286

merged 7 commits into from
Jul 27, 2022

Commits on Jul 25, 2022

  1. replace [0] with front() where applicable

    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    7455464 View commit details
    Browse the repository at this point in the history
  2. sonarlint: replace lock_guard with scoped_lock

    C++17 allows scoped_lock, which sonarlint recommends.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    2f62cd8 View commit details
    Browse the repository at this point in the history
  3. sonarlint: replace loop with find_if

    Sonarlint complains about this loop for some reason. Convert to find_if
    to fix.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    c12a266 View commit details
    Browse the repository at this point in the history
  4. sonarlint: add an empty do while loop

    Avoids warnings regarding unnecessary semicolons.
    
    Remove _fileno as it is unused.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    940a36b View commit details
    Browse the repository at this point in the history
  5. clang-tidy: use auto

    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    fe702a2 View commit details
    Browse the repository at this point in the history
  6. clang-tidy: avoid C casts

    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    9c175c0 View commit details
    Browse the repository at this point in the history
  7. replace shared_ptr with make_shared

    The former creates a nullptr. The latter actually allocates.
    
    Signed-off-by: Rosen Penev <rosenp@gmail.com>
    neheb committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    dd9fcb8 View commit details
    Browse the repository at this point in the history