MCPcopy Create free account
hub / github.com/assimp/assimp / Seek

Method Seek

code/Common/DefaultIOStream.cpp:112–126  ·  view source on GitHub ↗

----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

110
111// ----------------------------------------------------------------------------------
112aiReturn DefaultIOStream::Seek(size_t pOffset,
113 aiOrigin pOrigin) {
114 if (!mFile) {
115 return AI_FAILURE;
116 }
117
118 // Just to check whether our enum maps one to one with the CRT constants
119 static_assert(aiOrigin_CUR == SEEK_CUR &&
120 aiOrigin_END == SEEK_END && aiOrigin_SET == SEEK_SET,
121 "aiOrigin_CUR == SEEK_CUR && \
122 aiOrigin_END == SEEK_END && aiOrigin_SET == SEEK_SET");
123
124 // do the seek
125 return (0 == select_fseek<sizeof(void *)>(mFile, (int64_t)pOffset, (int)pOrigin) ? AI_SUCCESS : AI_FAILURE);
126}
127
128// ----------------------------------------------------------------------------------
129size_t DefaultIOStream::Tell() const {

Callers 2

CheckMagicTokenMethod · 0.45
addTextureMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected