MCPcopy Create free account
hub / github.com/PacktPublishing/3D-Graphics-Rendering-Cookbook / saveStringList

Function saveStringList

shared/scene/Material.cpp:6–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "shared/Utils.h"
5
6void saveStringList(FILE* f, const std::vector<std::string>& lines)
7{
8 uint32_t sz = (uint32_t)lines.size();
9 fwrite(&sz, sizeof(uint32_t), 1, f);
10 for (const auto& s: lines)
11 {
12 sz = (uint32_t)s.length();
13 fwrite(&sz, sizeof(uint32_t), 1, f);
14 fwrite(s.c_str(), sz + 1, 1, f);
15 }
16}
17
18void loadStringList(FILE* f, std::vector<std::string>& lines)
19{

Callers 2

saveSceneFunction · 0.85
saveMaterialsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected