diff options
author | Underground78 <underground78@users.sourceforge.net> | 2011-08-05 23:44:45 +0400 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2011-08-05 23:44:45 +0400 |
commit | f079f9762d613e3c1a78dcc52c9a65d990066ac7 (patch) | |
tree | 20c771f3ddf9c2ef404cd80a93f829df51d7e9bb /src/Subtitles | |
parent | 18f02a91090710feef4ecac10e10befe6d1c41c8 (diff) |
cppcheck fixes:
- fix a memory leak in BaseSplitterFileEx.
- don't use extra class name qualifier in header files.
- use !empty() instead of size() > 0 since empty() is always O(1) while size() can sometimes be O(n).
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3585 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/RealTextParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Subtitles/RealTextParser.cpp b/src/Subtitles/RealTextParser.cpp index 6e8366585..779cb02ae 100644 --- a/src/Subtitles/RealTextParser.cpp +++ b/src/Subtitles/RealTextParser.cpp @@ -57,7 +57,7 @@ bool CRealTextParser::ParseRealText(wstring p_szFile) }
bPrevEndTimeMissing = false;
- } else if (vStartTimecodes.size() > 0 && vEndTimecodes.size() > 0) {
+ } else if (!vStartTimecodes.empty() && !vEndTimecodes.empty()) {
pair<int, int> pairTimecodes(vStartTimecodes.back(), vEndTimecodes.back());
if (szLine.length() > 0) {
@@ -125,7 +125,7 @@ bool CRealTextParser::ParseRealText(wstring p_szFile) }
bPrevEndTimeMissing = false;
- } else if (vStartTimecodes.size() > 0 && vEndTimecodes.size() > 0) {
+ } else if (!vStartTimecodes.empty() && !vEndTimecodes.empty()) {
pair<int, int> pairTimecodes(vStartTimecodes.back(), vEndTimecodes.back());
if (szLine.length() > 0) {
|