MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / saveDescription

Function saveDescription

src/OpenColorIO/OCIOYaml.cpp:219–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219inline void saveDescription(YAML::Emitter & out, const char * desc)
220{
221 if (desc && *desc)
222 {
223 // Remove trailing newlines so that only one is saved because they won't be read back.
224 std::string descStr = SanitizeNewlines(desc);
225
226 out << YAML::Key << "description" << YAML::Value;
227 if (descStr.find_first_of('\n') != std::string::npos)
228 {
229 out << YAML::Literal;
230 }
231 out << descStr;
232 }
233}
234
235inline void LogUnknownKeyWarning(const YAML::Node & node,
236 const YAML::Node & key)

Callers 1

saveFunction · 0.85

Calls 1

SanitizeNewlinesFunction · 0.85

Tested by

no test coverage detected