]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-70: remove a dependency on boost. 14546/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 8 Dec 2022 15:09:03 +0000 (10:09 -0500)
committerDavid Wells <drwells@email.unc.edu>
Thu, 8 Dec 2022 15:09:03 +0000 (10:09 -0500)
examples/step-70/step-70.cc

index 2ce4d97488d56fdb6ff6da531db80e9c34978fda..879e5c164173d4bb9636a4b9f9d61c215c9d0aea 100644 (file)
@@ -143,8 +143,6 @@ namespace LA
 #  include <TopoDS.hxx>
 #endif
 
-#include <boost/algorithm/string/case_conv.hpp>
-
 #include <cmath>
 #include <fstream>
 #include <iostream>
@@ -837,8 +835,12 @@ namespace Step70
         const auto &manifold_id   = pair.first;
         const auto &cad_file_name = pair.second;
 
-        const auto extension = boost::algorithm::to_lower_copy(
-          cad_file_name.substr(cad_file_name.find_last_of('.') + 1));
+        std::string extension =
+          cad_file_name.substr(cad_file_name.find_last_of('.') + 1);
+        std::transform(extension.begin(),
+                       extension.end(),
+                       extension.begin(),
+                       [](const char c) -> char { return std::tolower(c); });
 
         TopoDS_Shape shape;
         if (extension == "iges" || extension == "igs")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.