Explorar o código

const FieldDescriptorCompare

Clang now validates that <set> comparators must have a const operator():
https://reviews.llvm.org/rL291969

Discussion:
https://groups.google.com/d/msg/protobuf/9W6zFIHaJ-4/9RrfwelpEQAJ
Ross Wang %!s(int64=8) %!d(string=hai) anos
pai
achega
01a05a53f4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/google/protobuf/compiler/java/java_file.cc

+ 1 - 1
src/google/protobuf/compiler/java/java_file.cc

@@ -65,7 +65,7 @@ namespace java {
 namespace {
 
 struct FieldDescriptorCompare {
-  bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) {
+  bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) const {
     if(f1 == NULL) {
       return false;
     }