Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Node::setPageType(const QString& t)
- {
- if ((t == "API") || (t == "api"))
- pageType_ = ApiPage;
- else if (t == "howto") <<<===
- pageType_ = HowToPage;
- else if (t == "overview")
- pageType_ = OverviewPage;
- else if (t == "tutorial")
- pageType_ = TutorialPage;
- else if (t == "howto") <<<===
- pageType_ = HowToPage;
- else if (t == "article")
- pageType_ = ArticlePage;
- else if (t == "example")
- pageType_ = ExamplePage;
- else if (t == "ditamap")
- pageType_ = DitaMapPage;
- }
- This suspicious code was found in QT project by PVS-Studio static code analyzer.
- Warning message is:
- V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 386, 392. node.cpp 386
- 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