projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7366c27
)
Fixing the order of the comparison operation.
author
Tim King
<taking@google.com>
Mon, 17 Jul 2017 18:04:24 +0000
(11:04 -0700)
committer
Tim King
<taking@google.com>
Mon, 17 Jul 2017 18:04:24 +0000
(11:04 -0700)
src/util/regexp.cpp
patch
|
blob
|
history
diff --git
a/src/util/regexp.cpp
b/src/util/regexp.cpp
index 6afadfd5b38cc08c0730abc9e97f976712b01429..f8fc1833cbc867ddca426c737944fa68621b3a89 100644
(file)
--- a/
src/util/regexp.cpp
+++ b/
src/util/regexp.cpp
@@
-34,11
+34,11
@@
static_assert(UCHAR_MAX == 255, "Unsigned char is assumed to have 256 values.");
int String::cmp(const String &y) const {
if (size() != y.size()) {
- return size() < y.size() ?
1 : -
1;
+ return size() < y.size() ?
-1 :
1;
}
for (unsigned int i = 0; i < size(); ++i) {
if (d_str[i] != y.d_str[i]) {
- return getUnsignedCharAt(i) < y.getUnsignedCharAt(i) ?
1 : -
1;
+ return getUnsignedCharAt(i) < y.getUnsignedCharAt(i) ?
-1 :
1;
}
}
return 0;