From be427e6b6871596828a81ca5ba9b2a29b81f1c3f Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 17 Jan 2019 13:58:55 +0300 Subject: [PATCH] Using default args instead of to versions of GenerateTrafficValuesFromBinary() function. --- traffic/pytraffic/bindings.cpp | 16 +++++----------- 1 file 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 GenerateTrafficValuesFromList(boost::python::list const & keys, return GenerateTrafficValues(keysVec, segmentMappingDict, true /* useTempBlock */); } -vector GenerateTrafficValuesFromBinaryV2(vector const & keysBlob, - boost::python::dict const & segmentMappingDict, - uint8_t useTempBlock) +vector GenerateTrafficValuesFromBinary(vector const & keysBlob, + boost::python::dict const & segmentMappingDict, + uint8_t useTempBlock = 1) { vector keys; traffic::TrafficInfo::DeserializeTrafficKeys(keysBlob, keys); @@ -158,12 +158,6 @@ vector GenerateTrafficValuesFromBinaryV2(vector const & keysBl return GenerateTrafficValues(keys, segmentMappingDict, useTempBlock); } -vector GenerateTrafficValuesFromBinary(vector 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)); }