MCPcopy Create free account
hub / github.com/axmolengine/axmol / readString

Method readString

core/3d/BundleReader.cpp:164–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164std::string BundleReader::readString()
165{
166 unsigned int length;
167 if (read(&length, 4, 1) != 1)
168 {
169 return std::string();
170 }
171
172 std::string str;
173
174 ssize_t validLength = _length - _position;
175 if (length > 0 && static_cast<ssize_t>(length) <= validLength)
176 {
177 str.resize(length);
178 if (read(&str[0], 1, length) != length)
179 {
180 return std::string();
181 }
182 }
183
184 return str;
185}
186
187bool BundleReader::readMatrix(float* m)
188{

Callers 8

loadMeshDatasBinaryMethod · 0.45
loadMaterialsBinaryMethod · 0.45
loadBinaryMethod · 0.45
loadSkinDataBinaryMethod · 0.45

Calls 1

resizeMethod · 0.45

Tested by

no test coverage detected