MCPcopy Create free account
hub / github.com/DFHack/dfhack / toint

Function toint

plugins/tiletypes.cpp:503–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503int toint(const std::string &str, int failValue = 0)
504{
505 std::istringstream ss(str);
506 int valInt;
507 ss >> valInt;
508 if (ss.fail())
509 {
510 return failValue;
511 }
512 return valInt;
513}
514
515bool tryShape(std::string value, TileType &paint)
516{

Callers 1

processTileTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected