]> git.sesse.net Git - stockfish/commitdiff
Fix a compile error with Intel icc
authorMarco Costalba <mcostalba@gmail.com>
Sun, 12 Apr 2009 16:01:06 +0000 (18:01 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 13 Apr 2009 11:02:06 +0000 (12:02 +0100)
To make std::sort() work operator<() should be
declared const.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/ucioption.cpp

index 2eb7d1c62c6a0c9480a4ebf75c2e0adef1f6c277..1504f64ec41c8d88c3bfe40283a61907bb2af1bd 100644 (file)
@@ -68,7 +68,7 @@ namespace {
     Option(bool defaultValue, OptionType = CHECK);
     Option(int defaultValue, int minValue, int maxValue);
 
-    bool operator<(const Option& o) { return this->idx < o.idx; }
+    bool operator<(const Option& o) const { return this->idx < o.idx; }
   };
 
   typedef std::map<std::string, Option> Options;