Changeset 1b772749 for src/Common
- Timestamp:
- Sep 16, 2016, 10:48:28 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 2298f728
- Parents:
- ba7aa2d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
rba7aa2d r1b772749 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 8 17:33:59201613 // Update Count : 2 212 // Last Modified On : Fri Sep 16 19:13:21 2016 13 // Update Count : 26 14 14 // 15 15 … … 25 25 #include <sstream> 26 26 #include <string> 27 #include <cassert> 27 28 28 29 template< typename T > … … 104 105 105 106 static inline std::string assign_strptr( const std::string *str ) { 106 if ( str == 0 ) { 107 return ""; 108 } else { 109 std::string tmp; 110 tmp = *str; 111 delete str; 112 return tmp; 113 } // if 107 std::string tmp( *str ); 108 delete str; 109 return tmp; 114 110 } 115 111
Note: See TracChangeset
for help on using the changeset viewer.