Compare commits
No commits in common. "955ec010b8e75f6ae64fb26aed7e4ec801bba813" and "76210e147aedef4455fc48339c044020557563d6" have entirely different histories.
955ec010b8
...
76210e147a
3 changed files with 1 additions and 12 deletions
|
@ -45,10 +45,6 @@ auto BinaryReader::position() -> Long {
|
||||||
return _ftelli64(_file);
|
return _ftelli64(_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto BinaryReader::seek(Long position) -> bool {
|
|
||||||
return _fseeki64(_file, position, SEEK_SET) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BinaryReader::closeFile() {
|
void BinaryReader::closeFile() {
|
||||||
std::fclose(_file);
|
std::fclose(_file);
|
||||||
_file = nullptr;
|
_file = nullptr;
|
||||||
|
|
|
@ -36,8 +36,6 @@ class BinaryReader {
|
||||||
auto eof() -> bool;
|
auto eof() -> bool;
|
||||||
auto position() -> Long;
|
auto position() -> Long;
|
||||||
|
|
||||||
auto seek(Long position) -> bool;
|
|
||||||
|
|
||||||
void closeFile();
|
void closeFile();
|
||||||
|
|
||||||
auto readChar(char& value) -> bool;
|
auto readChar(char& value) -> bool;
|
||||||
|
@ -53,11 +51,6 @@ 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;
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct Crc32 {
|
||||||
};
|
};
|
||||||
|
|
||||||
const Containers::StaticArray<256, UnsignedInt> Crc32::table = []{
|
const Containers::StaticArray<256, UnsignedInt> Crc32::table = []{
|
||||||
UnsignedInt polynomial = 0xEDB88320u;
|
UnsignedInt polynomial = 0xEDB88320;
|
||||||
Containers::StaticArray<256, UnsignedInt> temp{ValueInit};
|
Containers::StaticArray<256, UnsignedInt> temp{ValueInit};
|
||||||
|
|
||||||
for(UnsignedInt i = 0; i < 256; i++) {
|
for(UnsignedInt i = 0; i < 256; i++) {
|
||||||
|
|
Loading…
Reference in a new issue