MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / readLine

Method readLine

Engine/source/core/fileObject.cpp:148–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148const U8 *FileObject::readLine()
149{
150 if(!mFileBuffer)
151 return (U8 *) "";
152
153 U32 tokPos = mCurPos;
154
155 for(;;)
156 {
157 if(mCurPos == mBufferSize)
158 break;
159
160 if(mFileBuffer[mCurPos] == '\r')
161 {
162 mFileBuffer[mCurPos++] = 0;
163 if(mFileBuffer[mCurPos] == '\n')
164 mCurPos++;
165 break;
166 }
167
168 if(mFileBuffer[mCurPos] == '\n')
169 {
170 mFileBuffer[mCurPos++] = 0;
171 break;
172 }
173
174 mCurPos++;
175 }
176
177 return mFileBuffer + tokPos;
178}
179
180void FileObject::peekLine( S32 peekLineOffset, U8* line, S32 length )
181{

Callers 7

saveMethod · 0.45
readFileMethod · 0.45
lang.cppFile · 0.45
fileObject.cppFile · 0.45
readTextMethod · 0.45
loadSISFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected