From b64c17bfc43639df70d5e969a9c3b4f6c84aa927 Mon Sep 17 00:00:00 2001 From: Sergey Magidovich Date: Wed, 17 Aug 2016 15:41:47 +0300 Subject: [PATCH] Read sample as a file of object ids. --- base/base_tests/string_utils_test.cpp | 4 +- base/stl_add.hpp | 2 +- base/string_utils.hpp | 6 +- generator/booking_dataset.cpp | 58 ++-- generator/booking_dataset.hpp | 20 +- .../booking_quality_check.cpp | 273 ++++++++++++------ generator/osm_id.hpp | 1 - generator/osm_source.cpp | 3 +- 8 files changed, 236 insertions(+), 131 deletions(-) diff --git a/base/base_tests/string_utils_test.cpp b/base/base_tests/string_utils_test.cpp index 304d6b2ce8..7612468777 100644 --- a/base/base_tests/string_utils_test.cpp +++ b/base/base_tests/string_utils_test.cpp @@ -456,8 +456,8 @@ UNIT_TEST(Tokenize) { { initializer_list expected{"acb", "def", "ghi"}; - TEST_EQUAL(strings::Tokenize("acb def ghi", " "), vector(expected), ()); - TEST_EQUAL(strings::Tokenize("acb def ghi", " "), set(expected), ()); + TEST_EQUAL(strings::Tokenize("acb def ghi", " " /* delims */), vector(expected), ()); + TEST_EQUAL(strings::Tokenize("acb def ghi", " " /* delims */), set(expected), ()); } { static_assert(is_same, decltype(strings::Tokenize("", ""))>::value); diff --git a/base/stl_add.hpp b/base/stl_add.hpp index 7a1331358c..8ccfdffa53 100644 --- a/base/stl_add.hpp +++ b/base/stl_add.hpp @@ -32,7 +32,7 @@ public: } void operator() (typename ContainerT::value_type const & t) const { - m_Container.insert(t); + m_Container.insert(end(m_Container), t); } }; diff --git a/base/string_utils.hpp b/base/string_utils.hpp index c7645767a7..8d7c37e8a6 100644 --- a/base/string_utils.hpp +++ b/base/string_utils.hpp @@ -1,6 +1,7 @@ #pragma once #include "base/buffer_vector.hpp" +#include "base/stl_add.hpp" #include "std/algorithm.hpp" #include "std/cstdint.hpp" @@ -310,10 +311,7 @@ template