diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2019-01-17 13:58:55 +0300 |
---|---|---|
committer | Vlad Mihaylenko <vxmihaylenko@gmail.com> | 2019-01-17 18:08:54 +0300 |
commit | be427e6b6871596828a81ca5ba9b2a29b81f1c3f (patch) | |
tree | ea75b7302d7c7eabee3e98f8c42912a76aae4d58 | |
parent | 305a95ece49666ac0af4cc5689d54c8515a63f54 (diff) |
Using default args instead of to versions of GenerateTrafficValuesFromBinary() function.
-rw-r--r-- | traffic/pytraffic/bindings.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/traffic/pytraffic/bindings.cpp b/traffic/pytraffic/bindings.cpp index 6e8cbb037e..62623b82b5 100644 --- a/traffic/pytraffic/bindings.cpp +++ b/traffic/pytraffic/bindings.cpp @@ -148,9 +148,9 @@ vector<uint8_t> GenerateTrafficValuesFromList(boost::python::list const & keys, return GenerateTrafficValues(keysVec, segmentMappingDict, true /* useTempBlock */); } -vector<uint8_t> GenerateTrafficValuesFromBinaryV2(vector<uint8_t> const & keysBlob, - boost::python::dict const & segmentMappingDict, - uint8_t useTempBlock) +vector<uint8_t> GenerateTrafficValuesFromBinary(vector<uint8_t> const & keysBlob, + boost::python::dict const & segmentMappingDict, + uint8_t useTempBlock = 1) { vector<traffic::TrafficInfo::RoadSegmentId> keys; traffic::TrafficInfo::DeserializeTrafficKeys(keysBlob, keys); @@ -158,12 +158,6 @@ vector<uint8_t> GenerateTrafficValuesFromBinaryV2(vector<uint8_t> const & keysBl return GenerateTrafficValues(keys, segmentMappingDict, useTempBlock); } -vector<uint8_t> GenerateTrafficValuesFromBinary(vector<uint8_t> const & keysBlob, - boost::python::dict const & segmentMappingDict) -{ - return GenerateTrafficValuesFromBinaryV2(keysBlob, segmentMappingDict, true /* useTempBlock */); -} - void LoadClassificator(string const & classifPath) { GetPlatform().SetResourceDir(classifPath); @@ -211,6 +205,6 @@ BOOST_PYTHON_MODULE(pytraffic) def("load_classificator", LoadClassificator); def("generate_traffic_keys", GenerateTrafficKeys); def("generate_traffic_values_from_list", GenerateTrafficValuesFromList); - def("generate_traffic_values_from_binary", GenerateTrafficValuesFromBinary); - def("generate_traffic_values_from_binary_v2", GenerateTrafficValuesFromBinaryV2); + def("generate_traffic_values_from_binary", GenerateTrafficValuesFromBinary, + (arg("keysBlob"), arg("segmentMappingDict"), arg("useTempBlock") = 1)); } |