mirror of
https://github.com/serge1/ELFIO.git
synced 2025-03-20 13:20:45 +00:00
Reduce complexity of 'if' nesting
This commit is contained in:
parent
f1c7d420e4
commit
cfa213d646
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -97,5 +97,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gtest-adapter.debugConfig": "Run ELFIO Tests",
|
"gtest-adapter.debugConfig": "Run ELFIO Tests",
|
||||||
"gtest-adapter.supportLocation": true
|
"gtest-adapter.supportLocation": true,
|
||||||
|
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/compile_commands.json"
|
||||||
}
|
}
|
@ -305,16 +305,15 @@ class elfio
|
|||||||
&& ( a->get_size() > 0 )
|
&& ( a->get_size() > 0 )
|
||||||
&& ( b->get_size() > 0 )
|
&& ( b->get_size() > 0 )
|
||||||
&& ( a->get_offset() > 0 )
|
&& ( a->get_offset() > 0 )
|
||||||
&& (b->get_offset() > 0)) {
|
&& ( b->get_offset() > 0 )
|
||||||
if ( is_offset_in_section( a->get_offset(), b )
|
&& ( is_offset_in_section( a->get_offset(), b )
|
||||||
|| is_offset_in_section( a->get_offset()+a->get_size()-1, b )
|
|| is_offset_in_section( a->get_offset()+a->get_size()-1, b )
|
||||||
|| is_offset_in_section( b->get_offset(), a )
|
|| is_offset_in_section( b->get_offset(), a )
|
||||||
|| is_offset_in_section( b->get_offset()+b->get_size()-1, a )) {
|
|| is_offset_in_section( b->get_offset()+b->get_size()-1, a ) ) ) {
|
||||||
errors += "Sections " + a->get_name() + " and " + b->get_name() + " overlap in file\n";
|
errors += "Sections " + a->get_name() + " and " + b->get_name() + " overlap in file\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Check for conflicting section / program header tables, where
|
// Check for conflicting section / program header tables, where
|
||||||
// the same offset has different vaddresses in section table and
|
// the same offset has different vaddresses in section table and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user