Changeset 790d835 for src/Common/UniqueName.cc
- Timestamp:
- Nov 7, 2023, 3:38:01 PM (6 months ago)
- Branches:
- master
- Children:
- c6b4432
- Parents:
- 934fa0f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/UniqueName.cc
r934fa0f r790d835 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // UniqueName.cc -- 7 // UniqueName.cc -- Create a unique variants of a base name with a counter. 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon Jun 8 14:47:49 201513 // Update Count : 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Tue Nov 7 15:04:00 2023 13 // Update Count : 4 14 14 // 15 15 16 #include <string> 17 #include <sstream> 16 #include "UniqueName.h" 18 17 19 #include " UniqueName.h"18 #include "Common/ToString.hpp" 20 19 21 20 UniqueName::UniqueName( const std::string &base ) : base( base ), count( 0 ) { … … 23 22 24 23 std::string UniqueName::newName( const std::string &additional ) { 25 std::ostringstream os; 26 os << base << additional << count++; 27 return os.str(); 24 return toString( base, additional, count++ ); 28 25 } 29 26
Note: See TracChangeset
for help on using the changeset viewer.