MCPcopy Create free account
hub / github.com/WheretIB/nullc / FileWriteType

Function FileWriteType

NULLC/includes/file.cpp:59–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58 template<typename T>
59 void FileWriteType(T data, File* file)
60 {
61 if(!file->handle)
62 {
63 nullcThrowError("Cannot write to a closed file.");
64 return;
65 }
66 if(1 != fwrite(&data, sizeof(T), 1, file->handle))
67 nullcThrowError("Failed to write to a file.");
68 }
69 void FileWriteC(char data, File* file)
70 {
71 FileWriteType<char>(data, file);

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected