diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/string_util.cpp | 2 | ||||
| -rw-r--r-- | src/common/string_util.h | 2 | ||||
| -rw-r--r-- | src/common/vector_math.h | 12 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index bad311793..6959915fa 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -117,7 +117,7 @@ std::string StringFromFormat(const char* format, ...) { | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | // For Debugging. Read out an u8 array. | 119 | // For Debugging. Read out an u8 array. |
| 120 | std::string ArrayToString(const u8* data, u32 size, int line_len, bool spaces) { | 120 | std::string ArrayToString(const u8* data, size_t size, int line_len, bool spaces) { |
| 121 | std::ostringstream oss; | 121 | std::ostringstream oss; |
| 122 | oss << std::setfill('0') << std::hex; | 122 | oss << std::setfill('0') << std::hex; |
| 123 | 123 | ||
diff --git a/src/common/string_util.h b/src/common/string_util.h index 075bf4ecb..259360aec 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -33,7 +33,7 @@ inline void CharArrayFromFormat(char (&out)[Count], const char* format, ...) { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | // Good | 35 | // Good |
| 36 | std::string ArrayToString(const u8* data, u32 size, int line_len = 20, bool spaces = true); | 36 | std::string ArrayToString(const u8* data, size_t size, int line_len = 20, bool spaces = true); |
| 37 | 37 | ||
| 38 | std::string StripSpaces(const std::string& s); | 38 | std::string StripSpaces(const std::string& s); |
| 39 | std::string StripQuotes(const std::string& s); | 39 | std::string StripQuotes(const std::string& s); |
diff --git a/src/common/vector_math.h b/src/common/vector_math.h index 2b05f66ee..3f0057d9e 100644 --- a/src/common/vector_math.h +++ b/src/common/vector_math.h | |||
| @@ -104,8 +104,7 @@ public: | |||
| 104 | } | 104 | } |
| 105 | template <typename V> | 105 | template <typename V> |
| 106 | void operator*=(const V& f) { | 106 | void operator*=(const V& f) { |
| 107 | x *= f; | 107 | *this = *this * f; |
| 108 | y *= f; | ||
| 109 | } | 108 | } |
| 110 | template <typename V> | 109 | template <typename V> |
| 111 | Vec2<decltype(T{} / V{})> operator/(const V& f) const { | 110 | Vec2<decltype(T{} / V{})> operator/(const V& f) const { |
| @@ -262,9 +261,7 @@ public: | |||
| 262 | } | 261 | } |
| 263 | template <typename V> | 262 | template <typename V> |
| 264 | void operator*=(const V& f) { | 263 | void operator*=(const V& f) { |
| 265 | x *= f; | 264 | *this = *this * f; |
| 266 | y *= f; | ||
| 267 | z *= f; | ||
| 268 | } | 265 | } |
| 269 | template <typename V> | 266 | template <typename V> |
| 270 | Vec3<decltype(T{} / V{})> operator/(const V& f) const { | 267 | Vec3<decltype(T{} / V{})> operator/(const V& f) const { |
| @@ -478,10 +475,7 @@ public: | |||
| 478 | } | 475 | } |
| 479 | template <typename V> | 476 | template <typename V> |
| 480 | void operator*=(const V& f) { | 477 | void operator*=(const V& f) { |
| 481 | x *= f; | 478 | *this = *this * f; |
| 482 | y *= f; | ||
| 483 | z *= f; | ||
| 484 | w *= f; | ||
| 485 | } | 479 | } |
| 486 | template <typename V> | 480 | template <typename V> |
| 487 | Vec4<decltype(T{} / V{})> operator/(const V& f) const { | 481 | Vec4<decltype(T{} / V{})> operator/(const V& f) const { |