Changes in src/Common/UniqueName.cc [790d835:5f2f2d7]
- File:
-
- 1 edited
-
src/Common/UniqueName.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/UniqueName.cc
r790d835 r5f2f2d7 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // UniqueName.cc -- Create a unique variants of a base name with a counter.7 // UniqueName.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tue Nov 7 15:04:00 202313 // Update Count : 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 8 14:47:49 2015 13 // Update Count : 3 14 14 // 15 15 16 #include <string> 17 #include <sstream> 18 16 19 #include "UniqueName.h" 17 18 #include "Common/ToString.hpp"19 20 20 21 UniqueName::UniqueName( const std::string &base ) : base( base ), count( 0 ) { … … 22 23 23 24 std::string UniqueName::newName( const std::string &additional ) { 24 return toString( base, additional, count++ ); 25 std::ostringstream os; 26 os << base << additional << count++; 27 return os.str(); 25 28 } 26 29
Note:
See TracChangeset
for help on using the changeset viewer.