MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ReadLine

Function ReadLine

Source/Engine/ContentImporters/ImportIES.cpp:36–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static void ReadLine(const uint8*& bufferPos, char line[MAX_LINE], bool skipUntilWhitespace)
37{
38 SkipWhiteSpace(bufferPos);
39
40 char* linePtr = line;
41 uint32 i;
42 for (i = 0; i < 255; i++)
43 {
44 if (*bufferPos == 0)
45 {
46 break;
47 }
48 if (*bufferPos == 13 && *(bufferPos + 1) == 10)
49 {
50 bufferPos += 2;
51 break;
52 }
53 if (*bufferPos == 10)
54 {
55 bufferPos++;
56 continue;
57 }
58 if (skipUntilWhitespace && *bufferPos <= ' ')
59 {
60 bufferPos++;
61 break;
62 }
63
64 *linePtr++ = *bufferPos++;
65 }
66
67 line[i] = 0;
68}
69
70static bool ReadFloat(const uint8*& bufferPos, float& ret)
71{

Callers 3

ReadTokenMethod · 0.85
ReadFloatFunction · 0.85
LoadMethod · 0.85

Calls 1

SkipWhiteSpaceFunction · 0.85

Tested by

no test coverage detected