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 {
62
62
return false ;
63
63
}
64
64
for (size_t i = 0 ; i < fields.size (); i++) {
65
- if (!( *fields[i] == *s->fields [i]) ) {
65
+ if (*fields[i] != *s->fields [i]) {
66
66
return false ;
67
67
}
68
68
}
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; }
13
13
bool TypeAndName::operator ==(const TypeAndName &other) const {
14
14
return name == other.name && *type == *other.type ;
15
15
}
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 {
21
21
22
22
bool operator ==(const TypeAndName &other) const ;
23
23
24
+ bool operator !=(const TypeAndName &other) const ;
25
+
24
26
protected:
25
27
std::string name;
26
28
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 {
46
46
if (isVariadic != functionPointerType->isVariadic ) {
47
47
return false ;
48
48
}
49
- if (!( *returnType == *functionPointerType->returnType ) ) {
49
+ if (*returnType != *functionPointerType->returnType ) {
50
50
return false ;
51
51
}
52
52
if (parametersTypes.size () !=
53
53
functionPointerType->parametersTypes .size ()) {
54
54
return false ;
55
55
}
56
56
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]) {
59
59
return false ;
60
60
}
61
61
}
Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ std::string Type::str() const { return ""; }
5
5
bool Type::usesType (const std::shared_ptr<Type> &type) const { return false ; }
6
6
7
7
bool 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 {
16
16
virtual bool usesType (const std::shared_ptr<Type> &type) const ;
17
17
18
18
virtual bool operator ==(const Type &other) const ;
19
+
20
+ virtual bool operator !=(const Type &other) const ;
19
21
};
20
22
21
23
#endif // SCALA_NATIVE_BINDGEN_TYPE_H
You can’t perform that action at this time.
0 commit comments