Changeset 5f2f2d7 for src/Common
- Timestamp:
- Jun 8, 2015, 8:56:35 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 81419b5
- Parents:
- cd623a4
- Location:
- src/Common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Common/SemanticError.h ¶
rcd623a4 r5f2f2d7 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:22:23 201513 // Update Count : 112 // Last Modified On : Mon Jun 8 14:38:53 2015 13 // Update Count : 4 14 14 // 15 15 … … 19 19 #include <exception> 20 20 #include <string> 21 #include <s trstream>21 #include <sstream> 22 22 #include <list> 23 23 #include <iostream> … … 42 42 template< typename T > 43 43 SemanticError::SemanticError( const std::string &error, const T *obj ) { 44 std::ostr stream os;44 std::ostringstream os; 45 45 os << "Error: " << error; 46 46 obj->print( os ); 47 errors.push_back( std::string( os.str(), os.pcount()) );47 errors.push_back( os.str() ); 48 48 } 49 49 -
TabularUnified src/Common/UniqueName.cc ¶
rcd623a4 r5f2f2d7 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:23:41201513 // Update Count : 112 // Last Modified On : Mon Jun 8 14:47:49 2015 13 // Update Count : 3 14 14 // 15 15 16 16 #include <string> 17 #include <s trstream>17 #include <sstream> 18 18 19 19 #include "UniqueName.h" … … 23 23 24 24 std::string UniqueName::newName( const std::string &additional ) { 25 std::ostr stream os;25 std::ostringstream os; 26 26 os << base << additional << count++; 27 return std::string( os.str(), os.pcount());27 return os.str(); 28 28 } 29 29 -
TabularUnified src/Common/utility.h ¶
rcd623a4 r5f2f2d7 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 4 21:29:57201513 // Update Count : 912 // Last Modified On : Mon Jun 8 14:43:54 2015 13 // Update Count : 13 14 14 // 15 15 … … 18 18 19 19 #include <iostream> 20 #include <s trstream>20 #include <sstream> 21 21 #include <iterator> 22 22 #include <string> … … 130 130 template < typename T > 131 131 std::string toString ( T value ) { 132 std::ostrstream os; 133 132 std::ostringstream os; 134 133 os << value; // << std::ends; 135 os.freeze( false ); 136 137 return std::string(os.str(), os.pcount()); 134 return os.str(); 138 135 } 139 136
Note: See TracChangeset
for help on using the changeset viewer.