[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue 4546: don't redefine comparison operators for std::string (issue 2
From: |
nine . fierce . ballads |
Subject: |
Issue 4546: don't redefine comparison operators for std::string (issue 256410043 by address@hidden) |
Date: |
Sat, 08 Aug 2015 23:36:14 +0000 |
Reviewers: ,
Description:
Don't redefine comparison operators for std::string
This works fine in LilyDev 3, but I wonder what will happen on other
platforms.
Please review this at https://codereview.appspot.com/256410043/
Affected files (+1, -11 lines):
M flower/include/rational.hh
M flower/include/std-string.hh
M flower/std-string.cc
Index: flower/include/rational.hh
diff --git a/flower/include/rational.hh b/flower/include/rational.hh
index
253e09f4cc4214c44f03e16aa4e842d4056691be..f829e531eccb6ef2d431d9ffe290b0f745c3731d
100644
--- a/flower/include/rational.hh
+++ b/flower/include/rational.hh
@@ -20,6 +20,7 @@
#ifndef RATIONAL_HH
#define RATIONAL_HH
+#include "compare.hh"
#include "flower-proto.hh"
#include "std-string.hh"
#include <limits.h>
Index: flower/include/std-string.hh
diff --git a/flower/include/std-string.hh b/flower/include/std-string.hh
index
651f3403a11f590cb1035a4fdec62e7e1b4a9ce6..0a34d0504958c7fbe4ef8b05dae11b313d226321
100644
--- a/flower/include/std-string.hh
+++ b/flower/include/std-string.hh
@@ -20,7 +20,6 @@
#ifndef STD_STRING_HH
#define STD_STRING_HH
-#include "compare.hh"
#include "flower-proto.hh"
#if 0
@@ -55,8 +54,4 @@ string &replace_all (string *str, string const &find,
string const &replace);
string &replace_all (string *str, char find, char replace);
char *string_copy (const string &s);
-int string_compare (string const &, string const &);
-
-INSTANTIATE_COMPARE (string const &, string_compare);
-
#endif /* STD_STRING_HH */
Index: flower/std-string.cc
diff --git a/flower/std-string.cc b/flower/std-string.cc
index
347f0f3688a449fe1d219cd6a4040804cf4ee9dc..9666b9e9c3d2c91595bf3bb35ae07c3ddb75555d
100644
--- a/flower/std-string.cc
+++ b/flower/std-string.cc
@@ -116,12 +116,6 @@ string_copy (const string &s)
return dest;
}
-int
-string_compare (string const &a, string const &b)
-{
- return a.compare (b);
-}
-
#include "std-vector.hh"
vector<string>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Issue 4546: don't redefine comparison operators for std::string (issue 256410043 by address@hidden),
nine . fierce . ballads <=