Skip to content

Commit

Permalink
use std::replace instead of regex
Browse files Browse the repository at this point in the history
  • Loading branch information
TShapinsky committed Nov 8, 2024
1 parent 175fd88 commit 56565e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/alfalfa/AlfalfaPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <memory>
#include <string_view>
#include <algorithm>

namespace openstudio {
namespace alfalfa {
Expand Down Expand Up @@ -107,7 +108,9 @@ namespace alfalfa {
}

std::string AlfalfaPoint_Impl::toIdString(const std::string& str) {
return boost::regex_replace(str, boost::regex(" "), "_");
std::string id_string = str;
std::replace( id_string.begin(), id_string.end(), ' ', '_');
return id_string;
}
} // namespace detail

Expand Down

0 comments on commit 56565e9

Please sign in to comment.