mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2026-10-10 21:03:03 +08:00
9c705ef652
- Now using precompiled headers for extremely fast compilation times :D
17 lines
718 B
C++
17 lines
718 B
C++
#pragma once
|
|
template<size_t size, typename T> class buffer {
|
|
char buffer[size];
|
|
T data;
|
|
public:
|
|
operator T() { return data; }
|
|
T operator->() { return data; }
|
|
T& operator=(const T& other) { data = other; return data; }
|
|
T& operator*=(const T& other) { data *= other; return data; }
|
|
T operator*(const T& other) const { return data * other; }
|
|
T& operator/=(const T& other) { data /= other; return data; }
|
|
T operator/(const T& other) const { return data / other; }
|
|
T& operator+=(const T& other) { data += other; return data; }
|
|
T operator+(const T& other) const { return data + other; }
|
|
T& operator-=(const T& other) { data -= other; return data; }
|
|
T operator-(const T& other) const { return data - other; }
|
|
}; |