[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/strigi/src/streamanalyzer
From: Pino Toscano <pino () kde ! org>
Date: 2009-07-14 23:28:56
Message-ID: 1247614136.065838.24067.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 996829 by pino:
no need to get a substr() of a string and compare that with another string, but just \
use the right function of std::string (reduces really few memory allocations)
M +1 -1 fieldpropertiesdb.cpp
--- trunk/kdesupport/strigi/src/streamanalyzer/fieldpropertiesdb.cpp #996828:996829
@@ -328,7 +328,7 @@
struct stat s;
while (de) {
string path(pdir+de->d_name);
- if (path.length() >= 5 && path.substr(path.length()-5) == ".rdfs" &&
+ if (path.length() >= 5 && path.compare(path.length() - 5, 5, ".rdfs", 5) == \
0 &&
!stat(path.c_str(), &s) && S_ISREG(s.st_mode)) {
FILE* f = fopen(path.c_str(), "r");
if (f) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic