MCPcopy Create free account
hub / github.com/PDAL/PDAL / fromString

Function fromString

pdal/util/Utils.hpp:957–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955
956 template<typename T>
957 StatusWithReason fromString(const std::string& from, T* & to)
958 {
959 void *v;
960 // Uses sscanf instead of operator>>(istream, void*&) as a workaround
961 // for https://bugs.llvm.org/show_bug.cgi?id=19740, which presents with
962 // clang-800.0.42.1 for x86_64-apple-darwin15.6.0.
963 int result = sscanf(from.c_str(), "%p", &v);
964 if (result != 1) {
965 return false;
966 }
967 to = reinterpret_cast<T*>(v);
968 return true;
969 }
970
971
972 /**

Callers 2

setValueMethod · 0.70
setValueMethod · 0.70

Calls 3

strMethod · 0.80
clearMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected