MCPcopy Create free account
hub / github.com/LAStools/LAStools / rangeValidate

Function rangeValidate

LASlib/src/lasfilter.cpp:70–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68// outside of class > will be moved external soon...
69template <typename T>
70BOOL rangeValidate(const CHAR* argv, T* is1, T* is2, T min, T max)
71{
72 if (*is1 > *is2) {
73 std::swap(*is1, *is2);
74 }
75 if (*is1 < min)
76 {
77 std::cerr << "ERROR: \"" << argv << "\" argument falls below minimum(" << *is1 << " < " << min << ")";
78 return FALSE;
79 }
80 if (*is2 > max)
81 {
82 std::cerr << "ERROR: \"" << argv << "\" argument falls above maximum (" << *is2 << " > " << max << ")";
83 return FALSE;
84 }
85 return TRUE;
86}
87
88class LAScriterionAnd : public LAScriterion
89{

Callers 1

parseMethod · 0.85

Calls 1

swapFunction · 0.85

Tested by

no test coverage detected