| 93 | |
| 94 | template<typename T> |
| 95 | void FileReadType(T* data, File* file) |
| 96 | { |
| 97 | if(!file->handle) |
| 98 | { |
| 99 | nullcThrowError("Cannot read from a closed file."); |
| 100 | return; |
| 101 | } |
| 102 | if(1 != fread(data, sizeof(T), 1, file->handle)) |
| 103 | nullcThrowError("Failed to read from a file."); |
| 104 | } |
| 105 | void FileReadC(char* data, File* file) |
| 106 | { |
| 107 | FileReadType<char>(data, file); |
nothing calls this directly
no test coverage detected