Skip to content

Commit a23e030

Browse files
authored
simplify SST_ELI_COMPILED_VERSION handling (#1212)
1 parent 2e9d446 commit a23e030

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/sst/core/eli/elementinfo.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "sst/core/eli/elibase.h"
1717

18-
#include <sstream>
18+
#include <ostream>
1919
#include <string>
2020
#include <vector>
2121

@@ -35,16 +35,14 @@ static const std::vector<int> SST_ELI_COMPILED_VERSION = { 0, 9, 0 };
3535
std::string
3636
ProvidesDefaultInfo::getELIVersionString() const
3737
{
38-
std::stringstream stream;
39-
bool first = true;
40-
for ( int item : SST_ELI_COMPILED_VERSION ) {
41-
if ( first )
42-
first = false;
43-
else
44-
stream << ".";
45-
stream << item;
38+
std::string str;
39+
const char* delim = "";
40+
for ( auto item : SST_ELI_COMPILED_VERSION ) {
41+
str += delim;
42+
delim = ".";
43+
str += std::to_string(item);
4644
}
47-
return stream.str();
45+
return str;
4846
}
4947

5048
const std::vector<int>&

src/sst/core/eli/elibase.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ namespace ELI {
2222

2323
std::unique_ptr<LoadedLibraries::LibraryMap> LoadedLibraries::loaders_ {};
2424

25-
static const std::vector<int> SST_ELI_COMPILED_VERSION = { 0, 9, 0 };
26-
2725
bool
2826
LoadedLibraries::addLoader(
2927
const std::string& lib, const std::string& name, const std::string& alias, LibraryLoader* loader)

0 commit comments

Comments
 (0)