Эх сурвалжийг харах

result: Make comparison operators take references

It's unnecessary to make copies for simple comparisons like this.
Lioncash 11 жил өмнө
parent
commit
99ff8bbb0c
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      src/core/hle/result.h

+ 2 - 2
src/core/hle/result.h

@@ -208,11 +208,11 @@ union ResultCode {
     }
 };
 
-inline bool operator==(const ResultCode a, const ResultCode b) {
+inline bool operator==(const ResultCode& a, const ResultCode& b) {
     return a.raw == b.raw;
 }
 
-inline bool operator!=(const ResultCode a, const ResultCode b) {
+inline bool operator!=(const ResultCode& a, const ResultCode& b) {
     return a.raw != b.raw;
 }