MCPcopy Create free account
hub / github.com/colmap/colmap / __CheckOptionOpImpl

Function __CheckOptionOpImpl

src/colmap/util/logging.h:129–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127
128template <typename T1, typename T2>
129bool __CheckOptionOpImpl(const char* file,
130 const int line,
131 const bool result,
132 const T1& val1,
133 const T2& val2,
134 const char* val1_str,
135 const char* val2_str,
136 const char* op_str) {
137 if (result) {
138 return true;
139 } else {
140 LOG(ERROR) << StringPrintf("[%s:%d] Check failed: %s %s %s (%s vs. %s)",
141 __GetConstFileBaseName(file),
142 line,
143 val1_str,
144 op_str,
145 val2_str,
146 std::to_string(val1).c_str(),
147 std::to_string(val2).c_str());
148 return false;
149 }
150}
151
152inline std::string __MakeExceptionPrefix(const char* file, int line) {
153 return "[" + std::string(__GetConstFileBaseName(file)) + ":" +

Callers

nothing calls this directly

Calls 2

StringPrintfFunction · 0.85
__GetConstFileBaseNameFunction · 0.85

Tested by

no test coverage detected