MCPcopy Create free account
hub / github.com/RenderKit/embree / ImFileClose

Function ImFileClose

tutorials/common/imgui/imgui.cpp:1909–1909  ·  view source on GitHub ↗

We should in theory be using fseeko()/ftello() with off_t and _fseeki64()/_ftelli64() with __int64, waiting for the PR that does that in a very portable pre-C++11 zero-warnings way.

Source from the content-addressed store, hash-verified

1907
1908// We should in theory be using fseeko()/ftello() with off_t and _fseeki64()/_ftelli64() with __int64, waiting for the PR that does that in a very portable pre-C++11 zero-warnings way.
1909bool ImFileClose(ImFileHandle f) { return fclose(f) == 0; }
1910ImU64 ImFileGetSize(ImFileHandle f) { long off = 0, sz = 0; return ((off = ftell(f)) != -1 && !fseek(f, 0, SEEK_END) && (sz = ftell(f)) != -1 && !fseek(f, off, SEEK_SET)) ? (ImU64)sz : (ImU64)-1; }
1911ImU64 ImFileRead(void* data, ImU64 sz, ImU64 count, ImFileHandle f) { return fread(data, (size_t)sz, (size_t)count, f); }
1912ImU64 ImFileWrite(const void* data, ImU64 sz, ImU64 count, ImFileHandle f) { return fwrite(data, (size_t)sz, (size_t)count, f); }

Callers 4

ImFileLoadToMemoryFunction · 0.70
ShutdownMethod · 0.70
LogFinishMethod · 0.70
SaveIniSettingsToDiskMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected