Formatting: force pointers to the left side.
This commit is contained in:
@@ -61,12 +61,12 @@ inline uint64_t byte_swap(uint64_t value) {
|
||||
return XENIA_BASE_BYTE_SWAP_64(value);
|
||||
}
|
||||
inline float byte_swap(float value) {
|
||||
uint32_t temp = byte_swap(*reinterpret_cast<uint32_t *>(&value));
|
||||
return *reinterpret_cast<float *>(&temp);
|
||||
uint32_t temp = byte_swap(*reinterpret_cast<uint32_t*>(&value));
|
||||
return *reinterpret_cast<float*>(&temp);
|
||||
}
|
||||
inline double byte_swap(double value) {
|
||||
uint64_t temp = byte_swap(*reinterpret_cast<uint64_t *>(&value));
|
||||
return *reinterpret_cast<double *>(&temp);
|
||||
uint64_t temp = byte_swap(*reinterpret_cast<uint64_t*>(&value));
|
||||
return *reinterpret_cast<double*>(&temp);
|
||||
}
|
||||
template <typename T>
|
||||
inline T byte_swap(T value) {
|
||||
@@ -80,19 +80,19 @@ inline T byte_swap(T value) {
|
||||
template <typename T>
|
||||
struct be {
|
||||
be() = default;
|
||||
be(const T &src) : value(xe::byte_swap(src)) {}
|
||||
be(const be &other) { value = other.value; }
|
||||
be(const T& src) : value(xe::byte_swap(src)) {}
|
||||
be(const be& other) { value = other.value; }
|
||||
operator T() const { return xe::byte_swap(value); }
|
||||
|
||||
be<T> &operator+=(int a) {
|
||||
be<T>& operator+=(int a) {
|
||||
*this = *this + a;
|
||||
return *this;
|
||||
}
|
||||
be<T> &operator-=(int a) {
|
||||
be<T>& operator-=(int a) {
|
||||
*this = *this - a;
|
||||
return *this;
|
||||
}
|
||||
be<T> &operator++() {
|
||||
be<T>& operator++() {
|
||||
*this += 1;
|
||||
return *this;
|
||||
} // ++a
|
||||
@@ -100,7 +100,7 @@ struct be {
|
||||
*this += 1;
|
||||
return (*this - 1);
|
||||
} // a++
|
||||
be<T> &operator--() {
|
||||
be<T>& operator--() {
|
||||
*this -= 1;
|
||||
return *this;
|
||||
} // --a
|
||||
|
||||
Reference in New Issue
Block a user