Skip to content
Snippets Groups Projects

Fix Wshadow warnings

Merged Christoph Grüninger requested to merge feature/fix-shadow-warnings into master

As always, please add your wishes for alternative renaming of variable names.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Added 7 commits:

    • 50ae534e...7fb6aa4d - 6 commits from branch master
    • d6a68c60 - Fix Wshadow warnings
  • Rebased, and renamed as wished by Christian. I am not sure whether this is a good idea, as both nnz_ and j_ are only protected and not private.

  • Any objections?

  • 423 423 */
    424 424 void setVerbosity(int v)
    425 425 {
    426 verbose = v;
    426 verbose_ = v;
    427 427 // set the verbosity level in UMFPack
    428 if (verbose == 0)
    428 if (verbose_ == 0)
    429 429 UMF_Control[UMFPACK_PRL] = 1;
    430 if (verbose == 1)
    430 if (verbose_ == 1)
    431 431 UMF_Control[UMFPACK_PRL] = 2;
    432 if (verbose == 2)
    432 if (verbose_ == 2)
    433 433 UMF_Control[UMFPACK_PRL] = 4;
    434 434 }
    • (Again, while we're at it, hinting at an unrelated change): Is there a good reason here not to turn that into a switch statement?

  • Added 4 commits:

    • d6a68c60...112fb39f - 3 commits from branch master
    • e777a8d0 - Fix Wshadow warnings
  • Yet another try. I just reused the iterator solver to avoid adding complexity.

  • Yet another try. I just reused the iterator solver to avoid adding complexity.

    I think reusing iterators is bad in general: it leaves it unclear if the previous value has any meaning. The code is easier to understand if variables have only a small scope and are not reused.

    So I would either use different names for both iterators or make their scope smaller to avoid the shadowing.

  • Added 1 commit:

    • 5b6619c8 - Fix Wshadow warnings
  • This time the name has been changed to solverIt.

  • LGTM ;)

  • Added 11 commits:

    • 5b6619c8...65ee9b15 - 10 commits from branch master
    • 3b2202f2 - Fix Wshadow warnings
  • mentioned in commit 6b890e74

  • Christoph Grüninger Status changed to merged

    Status changed to merged

  • mentioned in commit 922bd812

  • Please register or sign in to reply
    Loading