Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/utility.h

    r2298f728 r940bba3  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 23 11:46:47 2016
    13 // Update Count     : 28
     12// Last Modified On : Wed Jun  8 17:33:59 2016
     13// Update Count     : 22
    1414//
    1515
     
    2525#include <sstream>
    2626#include <string>
    27 #include <cassert>
    2827
    2928template< typename T >
     
    102101                } // if
    103102        } // for
     103}
     104
     105static 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
    104114}
    105115
     
    131141
    132142template < typename T >
    133 void toString_single( std::ostream & os, const T & value ) {
     143void toString_single ( std::ostream & os, const T & value ) {
    134144        os << value;
    135145}
    136146
    137147template < typename T, typename... Params >
    138 void toString_single( std::ostream & os, const T & value, const Params & ... params ) {
     148void toString_single ( std::ostream & os, const T & value, const Params & ... params ) {
    139149        os << value;
    140150        toString_single( os, params ... );
     
    142152
    143153template < typename ... Params >
    144 std::string toString( const Params & ... params ) {
     154std::string toString ( const Params & ... params ) {
    145155        std::ostringstream os;
    146156        toString_single( os, params... );
Note: See TracChangeset for help on using the changeset viewer.