Changeset 378 for trunk/src/stl
- Timestamp:
- 05/29/15 12:12:47 (10 years ago)
- Location:
- trunk/src/stl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/stl/assert.cc
r376 r378 34 34 } 35 35 # else 36 #include <assert.h> 36 extern "C" { 37 extern void __assert_fail(const char *, const char *, unsigned int, const char *) 38 throw() __attribute__ ((__noreturn__)); 39 } 37 40 # endif 38 41 void nv_internal_assert( const char * assertion, const char * file, unsigned int line, const char * function ) -
trunk/src/stl/string.cc
r374 r378 11 11 #include <cstdio> 12 12 #include <cstdlib> 13 #include <fstream> // for slurp only 13 14 14 15 using namespace nv; … … 16 17 static const double s_power_10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 17 18 10000000, 100000000, 1000000000 }; 19 20 std::string nv::slurp( const std::string& filename ) 21 { 22 std::ifstream input( filename ); 23 // if ( !input.is_open() ) NV_THROW( std::runtime_error, "File "+filename+" not found!"); 24 std::stringstream sstr; 25 while ( input >> sstr.rdbuf() ); 26 return sstr.str(); 27 } 18 28 19 29 static inline void string_reverse( char* begin, char* end )
Note: See TracChangeset
for help on using the changeset viewer.