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

Function StringToDouble

src/colmap/util/string.cc:199–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197} // namespace internal
198
199double StringToDouble(const std::string& str) {
200 std::istringstream iss(str);
201 iss.imbue(std::locale::classic());
202 double value;
203 iss >> value;
204 THROW_CHECK(!iss.fail()) << "Failed to parse floating-point value: " << str;
205 // Verify no trailing non-whitespace characters remain.
206 std::string remaining;
207 iss >> remaining;
208 THROW_CHECK(remaining.empty())
209 << "Failed to parse floating-point value: " << str;
210 return value;
211}
212
213std::string StringPrintf(const char* format, ...) {
214 va_list ap;

Callers 4

TESTFunction · 0.85
CSVToVectorFunction · 0.85
ReadPlyFunction · 0.85
ReadPlyMeshFunction · 0.85

Calls 1

emptyMethod · 0.80

Tested by 1

TESTFunction · 0.68