Repository navigation
Commit 145b7b4
Address SonarCloud findings: drop redundant c_str(), use is_same_v
SonarCloud flagged new-code smells on PR #538. Two are fixed here:
- S7121: JSONSegmentationMetaInformationHandler takes its argument as
std::string, so passing .c_str() forced a string -> const char* ->
string round-trip. Removed at both call sites (the string-overload
wrapper and the equivalence test).
- S6020: replace std::is_same<...>::value with std::is_same_v in all
four occurrences so the string and handler overloads stay consistent.
The remaining findings are recorded as won't-fix: the source_location
(S6190) and requires/concepts (S6195) suggestions are C++20-only while
this project builds as C++17, and the 8-parameter count (S107) is
inherited from the existing public string overload that the new handler
overload deliberately mirrors.
Verified locally (MSVC, C++17, Release): clean compile and 61/61 dcmqi
tests pass, including itkimage2segimage_handlerOverloadEquivalence.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5074f43 commit 145b7b4
3 files changed
Lines changed: 6 additions & 6 deletions
File tree
- apps/seg/Testing
- include/dcmqi
- libsrc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | ||
44 | 44 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments