Prefer EndsWith(s) over Right(n) == s

This commit is contained in:
J-P Nurmi
2015-08-14 12:35:51 +02:00
parent 4995e7517e
commit 21ed56f46a
6 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -483,7 +483,7 @@ CString CFile::GetShortName() const { return m_sShortName; }
CString CFile::GetDir() const {
CString sDir(m_sLongName);
while (!sDir.empty() && sDir.Right(1) != "/" && sDir.Right(1) != "\\") {
while (!sDir.empty() && !sDir.EndsWith("/") && !sDir.EndsWith("\\")) {
sDir.RightChomp();
}