MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / stringEntry

Function stringEntry

launcher/modplatform/packwiz/Packwiz.cpp:66–75  ·  view source on GitHub ↗

Helper functions for extracting data from the TOML file

Source from the content-addressed store, hash-verified

64
65// Helper functions for extracting data from the TOML file
66auto stringEntry(toml::table table, const std::string entry_name) -> QString
67{
68 auto node = table[entry_name];
69 if (!node) {
70 qCritical() << QString::fromStdString("Failed to read str property '" + entry_name + "' in mod metadata.");
71 return {};
72 }
73
74 return QString::fromStdString(node.value_or(""));
75}
76
77auto intEntry(toml::table table, const std::string entry_name) -> int
78{

Callers 1

getIndexForModMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected