projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2cc471
)
0023867: Reading performance improvement
author
szv
<szv@opencascade.com>
Thu, 28 Mar 2013 08:13:26 +0000
(12:13 +0400)
committer
szv
<szv@opencascade.com>
Fri, 5 Apr 2013 06:22:57 +0000
(10:22 +0400)
Small improvement in TCollection_AsciiString::Search.
src/TCollection/TCollection_AsciiString.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/TCollection/TCollection_AsciiString.cxx
b/src/TCollection/TCollection_AsciiString.cxx
index
2937417
..
8504eb5
100755
(executable)
--- a/
src/TCollection/TCollection_AsciiString.cxx
+++ b/
src/TCollection/TCollection_AsciiString.cxx
@@
-1339,14
+1339,12
@@
Standard_Integer TCollection_AsciiString::Search
if (size) {
int k,j;
int i = 0;
- Standard_Boolean find = Standard_False;
- while ( i < mylength-size+1 && !find) {
+ while ( i < mylength-size+1 ) {
k = i++;
j = 0;
while (j < size && mystring[k++] == what[j++])
- if (j == size)
find = Standard_True
;
+ if (j == size)
return i
;
}
- if (find) return i;
}
return -1;
}