diff options
author | vvvv <vvvv@ydb.tech> | 2023-07-31 20:07:26 +0300 |
---|---|---|
committer | vvvv <vvvv@ydb.tech> | 2023-07-31 20:07:26 +0300 |
commit | f9e4743508b7930e884714cc99985ac45f84ed98 (patch) | |
tree | a1290261a4915a6f607e110e2cc27aee4c205f85 /library/cpp/geo/util.cpp | |
parent | 5cf9beeab3ea847da0b6c414fcb5faa9cb041317 (diff) | |
download | ydb-f9e4743508b7930e884714cc99985ac45f84ed98.tar.gz |
Use UDFs from YDB
Diffstat (limited to 'library/cpp/geo/util.cpp')
-rw-r--r-- | library/cpp/geo/util.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/library/cpp/geo/util.cpp b/library/cpp/geo/util.cpp deleted file mode 100644 index e8d0fc378e6..00000000000 --- a/library/cpp/geo/util.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "util.h" - -#include <math.h> -#include <util/generic/cast.h> -#include <util/generic/string.h> -#include <util/string/cast.h> -#include <utility> - -namespace NGeo { - bool TryPairFromString(std::pair<double, double>& res, TStringBuf inputStr, TStringBuf delimiter) { - TStringBuf lhsStr; - TStringBuf rhsStr; - - double lhs = NAN; - double rhs = NAN; - if ( - !inputStr.TrySplit(delimiter, lhsStr, rhsStr) || - !TryFromString<double>(lhsStr, lhs) || - !TryFromString<double>(rhsStr, rhs)) { - return false; - } - - res = {lhs, rhs}; - return true; - } - - std::pair<double, double> PairFromString(TStringBuf inputStr, TStringBuf delimiter) { - std::pair<double, double> res; - if (!TryPairFromString(res, inputStr, delimiter)) { - ythrow TBadCastException() << "Wrong point string: " << inputStr; - } - return res; - } -} // namespace NGeo |