Skip to content

Commit

Permalink
Code improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
marcauberer committed Apr 11, 2024
1 parent 517d450 commit cfaee6c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 39 deletions.
4 changes: 0 additions & 4 deletions std/data/optional.spice
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,4 @@ public inline f<bool> Optional.isPresent() {

public f<bool> operator==<T>(const Optional<T>& lhs, const Optional<T>& rhs) {
return lhs.isPresent == rhs.isPresent && lhs.data == rhs.data;
}

public f<bool> operator!=<T>(const Optional<T>& lhs, const Optional<T>& rhs) {
return !(lhs == rhs);
}
4 changes: 0 additions & 4 deletions std/data/pair.spice
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ public inline p Pair.setSecond(const V2& second) {

public f<bool> operator==<V1, V2>(const Pair<V1, V2>& lhs, const Pair<V1, V2>& rhs) {
return lhs.first == rhs.first && lhs.second == rhs.second;
}

public f<bool> operator!=<V1, V2>(const Pair<V1, V2>& lhs, const Pair<V1, V2>& rhs) {
return !(lhs == rhs);
}
4 changes: 0 additions & 4 deletions std/data/triple.spice
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,4 @@ public inline p Triple.setThird(V3& third) {

public f<bool> operator==<V1, V2, V3>(const Triple<V1, V2, V3>& lhs, const Triple<V1, V2, V3>& rhs) {
return lhs.first == rhs.first && lhs.second == rhs.second && lhs.third == rhs.third;
}

public f<bool> operator!=<V1, V2, V3>(const Triple<V1, V2, V3>& lhs, const Triple<V1, V2, V3>& rhs) {
return !(lhs == rhs);
}
4 changes: 0 additions & 4 deletions std/io/filepath.spice
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ public inline f<bool> operator==(const FilePath& lhs, const FilePath& rhs) {
return lhs.path == rhs.path;
}

public inline f<bool> operator!=(const FilePath& lhs, const FilePath& rhs) {
return lhs.path != rhs.path;
}

public p operator/=(FilePath& lhs, string rhs) {
if lhs.path.isEmpty() || rhs[len(rhs) - 1] == PATH_SEPARATOR {
lhs.path += rhs;
Expand Down
4 changes: 0 additions & 4 deletions std/runtime/rtti_rt.spice
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,4 @@ public f<string> TypeInfo.getName() {

public f<bool> operator==(const TypeInfo& a, const TypeInfo& b) {
return a.name == b.name;
}

public f<bool> operator!=(const TypeInfo& a, const TypeInfo& b) {
return !(a == b);
}
19 changes: 0 additions & 19 deletions std/runtime/string_rt.spice
Original file line number Diff line number Diff line change
Expand Up @@ -257,25 +257,6 @@ public f<bool> operator==(string a, const String& b) {
return isRawEqual(a, b.getRaw());
}

/**
* Checks if two strings have not the same value
*
* @param a First input string
* @param b Second input string
* @return Not equal or not
*/
public f<bool> operator!=(const String& a, const String& b) {
return !(a == b);
}

public f<bool> operator!=(const String& a, const string& b) {
return !(a == b);
}

public f<bool> operator!=(const string& a, const String& b) {
return !(a == b);
}

/**
* Get the raw and immutable string from this container instance
*
Expand Down

0 comments on commit cfaee6c

Please sign in to comment.