Build viewer/editor #13
1 changed files with 5 additions and 0 deletions
|
@ -53,6 +53,11 @@ class BinaryReader {
|
||||||
auto readDouble(Double& value) -> bool;
|
auto readDouble(Double& value) -> bool;
|
||||||
auto readArray(Containers::Array<char>& array, std::size_t count) -> bool;
|
auto readArray(Containers::Array<char>& array, std::size_t count) -> bool;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
auto readValue(T& value) -> bool {
|
||||||
|
return fread(&value, sizeof(T), 1, _file) == sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
template<std::size_t S>
|
template<std::size_t S>
|
||||||
auto readStaticArray(Containers::StaticArray<S, char>& array) -> bool {
|
auto readStaticArray(Containers::StaticArray<S, char>& array) -> bool {
|
||||||
return std::fread(array.data(), sizeof(char), S, _file) == S;
|
return std::fread(array.data(), sizeof(char), S, _file) == S;
|
||||||
|
|
Loading…
Reference in a new issue