File tree Expand file tree Collapse file tree 6 files changed +14
-4
lines changed Expand file tree Collapse file tree 6 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ bool StructOrUnion::operator==(const StructOrUnion &other) const {
6262 return false ;
6363 }
6464 for (size_t i = 0 ; i < fields.size (); i++) {
65- if (!( *fields[i] == *s->fields [i]) ) {
65+ if (*fields[i] != *s->fields [i]) {
6666 return false ;
6767 }
6868 }
Original file line number Diff line number Diff line change @@ -13,3 +13,7 @@ void TypeAndName::setType(std::shared_ptr<Type> type) { this->type = type; }
1313bool TypeAndName::operator ==(const TypeAndName &other) const {
1414 return name == other.name && *type == *other.type ;
1515}
16+
17+ bool TypeAndName::operator !=(const TypeAndName &other) const {
18+ return !(*this == other);
19+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ class TypeAndName {
2121
2222 bool operator ==(const TypeAndName &other) const ;
2323
24+ bool operator !=(const TypeAndName &other) const ;
25+
2426 protected:
2527 std::string name;
2628 std::shared_ptr<Type> type;
Original file line number Diff line number Diff line change @@ -46,16 +46,16 @@ bool FunctionPointerType::operator==(const Type &other) const {
4646 if (isVariadic != functionPointerType->isVariadic ) {
4747 return false ;
4848 }
49- if (!( *returnType == *functionPointerType->returnType ) ) {
49+ if (*returnType != *functionPointerType->returnType ) {
5050 return false ;
5151 }
5252 if (parametersTypes.size () !=
5353 functionPointerType->parametersTypes .size ()) {
5454 return false ;
5555 }
5656 for (size_t i = 0 ; i < parametersTypes.size (); i++) {
57- if (!( *parametersTypes[i] = =
58- *functionPointerType->parametersTypes [i]) ) {
57+ if (*parametersTypes[i] ! =
58+ *functionPointerType->parametersTypes [i]) {
5959 return false ;
6060 }
6161 }
Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ std::string Type::str() const { return ""; }
55bool Type::usesType (const std::shared_ptr<Type> &type) const { return false ; }
66
77bool Type::operator ==(const Type &other) const { return false ; }
8+
9+ bool Type::operator !=(const Type &other) const { return !(*this == other); }
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ class Type {
1616 virtual bool usesType (const std::shared_ptr<Type> &type) const ;
1717
1818 virtual bool operator ==(const Type &other) const ;
19+
20+ virtual bool operator !=(const Type &other) const ;
1921};
2022
2123#endif // SCALA_NATIVE_BINDGEN_TYPE_H
You can’t perform that action at this time.
0 commit comments