diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-10-17 18:38:38 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-10-17 18:38:38 +0100 |
commit | 2d9774c26cd1dc3155e0a0cfb21007dc1a427742 (patch) | |
tree | 747aff6b07e829f501b9e200d10a50e915414c72 | |
parent | Custom hookmap type (diff) | |
download | slicer-2d9774c26cd1dc3155e0a0cfb21007dc1a427742.tar.bz2 slicer-2d9774c26cd1dc3155e0a0cfb21007dc1a427742.tar.xz slicer-2d9774c26cd1dc3155e0a0cfb21007dc1a427742.zip |
Remove unrequired case_less comparator
-rw-r--r-- | slicer/slicer/modelParts.h | 10 | ||||
-rw-r--r-- | slicer/test/serializers.cpp | 20 |
2 files changed, 0 insertions, 30 deletions
diff --git a/slicer/slicer/modelParts.h b/slicer/slicer/modelParts.h index c3dd87d..bcc6a05 100644 --- a/slicer/slicer/modelParts.h +++ b/slicer/slicer/modelParts.h @@ -122,16 +122,6 @@ namespace Slicer { const std::string * nameStr; }; - struct case_less { - template<typename A, typename B> - inline bool - operator()(const A & a, const B & b) const - { - const auto cmp = strncasecmp(a.data(), b.data(), std::min(a.length(), b.length())); - return (cmp < 0) || (!cmp && a.length() < b.length()); - } - }; - class DLL_PUBLIC ModelPart : public std::enable_shared_from_this<ModelPart> { public: ModelPart() = default; diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index 6b4393b..db22535 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -719,26 +719,6 @@ BOOST_AUTO_TEST_CASE(customerModelPartCounters) BOOST_REQUIRE_EQUAL(21, TestModule::completions); } -BOOST_FIXTURE_TEST_SUITE(l, Slicer::case_less); - -BOOST_AUTO_TEST_CASE(case_less_test) -{ - using namespace std::literals; - const auto & lc {*this}; - BOOST_CHECK(!lc(""sv, ""sv)); - BOOST_CHECK(lc("a"sv, "b"sv)); - BOOST_CHECK(lc("A"sv, "b"sv)); - BOOST_CHECK(lc("Aa"sv, "b"sv)); - BOOST_CHECK(lc("AA"sv, "b"sv)); - BOOST_CHECK(lc("aA"sv, "b"s)); - BOOST_CHECK(lc("A"s, "B"sv)); - BOOST_CHECK(lc("Aa"sv, "Bb"s)); - BOOST_CHECK(lc("AA"s, "bB"s)); - BOOST_CHECK(lc("aA"s, "BB"s)); -} - -BOOST_AUTO_TEST_SUITE_END(); - BOOST_AUTO_TEST_CASE(enum_lookups) { BOOST_CHECK_EQUAL("One", Slicer::ModelPartForEnum<TestModule::SomeNumbers>::lookup(TestModule::SomeNumbers::One)); |