Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::pair<std::string, long>> spectra_offsets;
- std::vector<std::pair<std::string, long>> chromatograms_offsets;
- template <typename MapType>
- void MzMLHandler<MapType>::writeFooter_(std::ostream& os)
- {
- ....
- int indexlists;
- if (spectra_offsets.empty() && spectra_offsets.empty() )
- {
- indexlists = 0;
- }
- else if (!spectra_offsets.empty() && !spectra_offsets.empty())
- {
- indexlists = 2;
- }
- else
- {
- indexlists = 1;
- }
- ....
- }
- This suspicious code was found in OpenMS project by PVS-Studio static code analyzer.
- Warning message is:
- V501 There are identical sub-expressions 'spectra_offsets.empty()' to the left and to the right of the '&&' operator. mzmlhandler.h 5288
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment