Skip to content

Commit

Permalink
Changed to pass string by ref
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Duffey <[email protected]>
  • Loading branch information
JDuffeyBQ committed Oct 31, 2023
1 parent 1cdba96 commit 9c2cd52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/complex/Utilities/DataArrayUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ std::unique_ptr<MaskCompare> InstantiateMaskCompare(IDataArray& maskArray)
}

//-----------------------------------------------------------------------------
bool ConvertIDataArray(const std::shared_ptr<IDataArray>& dataArray, std::string dataFormat)
bool ConvertIDataArray(const std::shared_ptr<IDataArray>& dataArray, const std::string& dataFormat)
{
auto dataType = dataArray->getDataType();
switch(dataType)
Expand Down
6 changes: 3 additions & 3 deletions src/complex/Utilities/DataArrayUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ Result<> CreateArray(DataStructure& dataStructure, const std::vector<usize>& tup
}

template <typename T>
std::shared_ptr<AbstractDataStore<T>> ConvertDataStore(const AbstractDataStore<T>& dataStore, std::string dataFormat)
std::shared_ptr<AbstractDataStore<T>> ConvertDataStore(const AbstractDataStore<T>& dataStore, const std::string& dataFormat)
{
if(dataStore.getDataFormat() == dataFormat)
{
Expand All @@ -489,7 +489,7 @@ std::shared_ptr<AbstractDataStore<T>> ConvertDataStore(const AbstractDataStore<T
}

template <typename T>
bool ConvertDataArray(const std::shared_ptr<DataArray<T>> dataArray, std::string dataFormat)
bool ConvertDataArray(const std::shared_ptr<DataArray<T>> dataArray, const std::string& dataFormat)
{
if(dataArray == nullptr)
{
Expand All @@ -506,7 +506,7 @@ bool ConvertDataArray(const std::shared_ptr<DataArray<T>> dataArray, std::string
return true;
}

bool ConvertIDataArray(const std::shared_ptr<IDataArray>& dataArray, std::string dataFormat);
bool ConvertIDataArray(const std::shared_ptr<IDataArray>& dataArray, const std::string& dataFormat);

/**
* @brief Creates a NeighborList array with the given properties
Expand Down

0 comments on commit 9c2cd52

Please sign in to comment.