MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / namedConstants

Function namedConstants

src/Eval.cpp:92–103  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Built-in support for some named constants.

Source from the content-addressed store, hash-verified

90////////////////////////////////////////////////////////////////////////////////
91// Built-in support for some named constants.
92static bool namedConstants(const std::string& name, Variant& value) {
93 if (name == "true")
94 value = Variant(true);
95 else if (name == "false")
96 value = Variant(false);
97 else if (name == "pi")
98 value = Variant(3.14159165);
99 else
100 return false;
101
102 return true;
103}
104
105////////////////////////////////////////////////////////////////////////////////
106// Support for evaluating DOM references (add with `e.AddSource(domSource)`)

Callers

nothing calls this directly

Calls 1

VariantClass · 0.85

Tested by

no test coverage detected