Inspection: Variable can be moved to init statement

This commit is contained in:
Urs Fleisch
2024-01-21 20:46:27 +01:00
parent 5d921c6325
commit dfe2aa5253
40 changed files with 149 additions and 220 deletions
+1 -2
View File
@@ -468,8 +468,7 @@ bool XM::File::save()
for(unsigned short j = 0; j < sampleCount; ++ j) {
if(sampleHeaderSize > 4U) {
seek(pos);
unsigned long sampleLength = 0;
if(!readU32L(sampleLength))
if(unsigned long sampleLength = 0; !readU32L(sampleLength))
return false;
if(sampleHeaderSize > 18U) {