Skip to content

Commit

Permalink
IOSS: Use string_view in logging function
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Dec 2, 2024
1 parent e9148fe commit 8f82d49
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_Decomposition.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ namespace Ioss {
return I->second;
}

void show_progress(const std::string &message) const
void show_progress(std::string_view message) const
{
if (m_showProgress) {
Ioss::ParallelUtils pu(m_comm);
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.C
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ void Ioss::ParallelUtils::all_gather(std::vector<T> &my_values, std::vector<T> &
#endif
}

void Ioss::ParallelUtils::progress(const std::string &output) const
void Ioss::ParallelUtils::progress(std::string_view output) const
{
static double begin = Utils::timer();

Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_ParallelUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ namespace Ioss {
template <typename T> void broadcast(T &my_value, int root = 0) const;
template <typename T> void broadcast(std::vector<T> &my_value, int root = 0) const;

void progress(const std::string &output) const;
void progress(std::string_view output) const;

private:
Ioss_MPI_Comm communicator_{comm_world()};
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ std::string Ioss::Utils::local_filename(const std::string &relative_filename,
}

int Ioss::Utils::field_warning(const Ioss::GroupingEntity *ge, const Ioss::Field &field,
const std::string &inout)
std::string_view inout)
{
if (field.get_name() != "ids") {
fmt::print(Ioss::WarnOut(), "{} '{}'. Unknown {} field '{}'\n", ge->type_string(), ge->name(),
Expand Down
2 changes: 1 addition & 1 deletion packages/seacas/libraries/ioss/src/Ioss_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ namespace Ioss {
std::vector<Ioss::Field> &fields);

static int field_warning(const Ioss::GroupingEntity *ge, const Ioss::Field &field,
const std::string &inout);
std::string_view inout);

static void calculate_sideblock_membership(IntVector &face_is_member, const SideBlock *sb,
size_t int_byte_size, const void *element,
Expand Down

0 comments on commit 8f82d49

Please sign in to comment.