MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / findOptionOrDefault

Function findOptionOrDefault

src/Core/Graphics/DrawUtils.cpp:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7{
8 template <typename T>
9 T findOptionOrDefault(
10 const DrawPolygonOptions& options, const char* key, T defaultValue)
11 {
12 if (options.find(key) == options.end())
13 return defaultValue;
14 return std::any_cast<T>(options.at(key));
15 }
16
17 void drawPoint(RenderTarget surface, int x, int y, float radius, const Color& color)
18 {

Callers 1

drawPolygonFunction · 0.85

Calls 3

findMethod · 0.45
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected