Commit 21adb91
committed
Zero-init planner structs via value-init instead of memset
cppcheck flags memset(0) on structs containing doubles (memsetClassFloat)
as non-portable. Use C++ value-initialization (`T x{};`, `*ptr = T{};`)
instead: for these POD structs it compiles to the same zeroing, is
portable (no reliance on all-zero-bits == 0.0), and clears the warning
legitimately rather than suppressing it.1 parent 6020ee3 commit 21adb91
3 files changed
Lines changed: 11 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
973 | | - | |
| 973 | + | |
974 | 974 | | |
975 | 975 | | |
976 | 976 | | |
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | 1163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
2878 | | - | |
2879 | | - | |
2880 | | - | |
2881 | | - | |
| 2878 | + | |
| 2879 | + | |
2882 | 2880 | | |
2883 | 2881 | | |
2884 | 2882 | | |
| |||
2926 | 2924 | | |
2927 | 2925 | | |
2928 | 2926 | | |
2929 | | - | |
2930 | | - | |
| 2927 | + | |
2931 | 2928 | | |
2932 | 2929 | | |
2933 | 2930 | | |
| |||
3880 | 3877 | | |
3881 | 3878 | | |
3882 | 3879 | | |
3883 | | - | |
3884 | | - | |
| 3880 | + | |
3885 | 3881 | | |
3886 | 3882 | | |
3887 | 3883 | | |
| |||
3893 | 3889 | | |
3894 | 3890 | | |
3895 | 3891 | | |
3896 | | - | |
| 3892 | + | |
3897 | 3893 | | |
3898 | 3894 | | |
3899 | 3895 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
754 | 754 | | |
755 | 755 | | |
756 | 756 | | |
757 | | - | |
758 | | - | |
759 | | - | |
| 757 | + | |
760 | 758 | | |
761 | 759 | | |
762 | 760 | | |
| |||
803 | 801 | | |
804 | 802 | | |
805 | 803 | | |
806 | | - | |
807 | | - | |
| 804 | + | |
808 | 805 | | |
809 | 806 | | |
810 | 807 | | |
| |||
1236 | 1233 | | |
1237 | 1234 | | |
1238 | 1235 | | |
1239 | | - | |
1240 | | - | |
| 1236 | + | |
1241 | 1237 | | |
1242 | 1238 | | |
1243 | 1239 | | |
| |||
0 commit comments