From c47e9e78eda31365ef9df310df8d173028c7b346 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sat, 13 Apr 2024 08:21:18 +0000 Subject: [PATCH] bench: drop leftover `boost::lexical_cast` benches, drop header from list `boost::lexical_cast` isn't used anywhere in Dash Core, the sole remaining use being in a benchmark, despite it no longer being used in Dash Core. Let's drop the benchmark and drop `boost/lexical_cast.hpp` from allowed Boost headers --- src/bench/string_cast.cpp | 32 -------------------------------- test/lint/lint-includes.sh | 1 - 2 files changed, 33 deletions(-) diff --git a/src/bench/string_cast.cpp b/src/bench/string_cast.cpp index 8f08d12103..bc59d79dbc 100644 --- a/src/bench/string_cast.cpp +++ b/src/bench/string_cast.cpp @@ -7,7 +7,6 @@ #include #include -#include #include template @@ -25,21 +24,6 @@ static void int_atoi(benchmark::Bench& bench) }); } -static void int_lexical_cast(benchmark::Bench& bench) -{ - bench.run([&] { - boost::lexical_cast("1"); - }); -} - -static void strings_1_lexical_cast(benchmark::Bench& bench) -{ - int i{0}; - bench.run([&] { - boost::lexical_cast(++i); - }); -} - static void strings_1_numberToString(benchmark::Bench& bench) { int i{0}; @@ -56,19 +40,6 @@ static void strings_1_tostring(benchmark::Bench& bench) }); } -static void strings_2_multi_lexical_cast(benchmark::Bench& bench) -{ - int i{0}; - bench.run([&] { static_cast( - boost::lexical_cast(i) + - boost::lexical_cast(i+1) + - boost::lexical_cast(i+2) + - boost::lexical_cast(i+3) + - boost::lexical_cast(i+4)); - ++i; - }); -} - static void strings_2_multi_numberToString(benchmark::Bench& bench) { int i{0}; @@ -97,11 +68,8 @@ static void strings_2_strptintf(benchmark::Bench& bench) } BENCHMARK(int_atoi); -BENCHMARK(int_lexical_cast); -BENCHMARK(strings_1_lexical_cast); BENCHMARK(strings_1_numberToString); BENCHMARK(strings_1_tostring); -BENCHMARK(strings_2_multi_lexical_cast); BENCHMARK(strings_2_multi_numberToString); BENCHMARK(strings_2_multi_tostring); BENCHMARK(strings_2_strptintf); diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh index e3f13c624f..57962a2ab2 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -53,7 +53,6 @@ EXPECTED_BOOST_INCLUDES=( boost/filesystem.hpp boost/filesystem/fstream.hpp boost/function.hpp - boost/lexical_cast.hpp boost/multi_index/hashed_index.hpp boost/multi_index/ordered_index.hpp boost/multi_index/sequenced_index.hpp