00001 // safe_assign.h 00002 00003 #ifndef SAFE_ASSIGN_H 00004 #define SAFE_ASSIGN_H 00005 00007 template<class T> 00008 void safe_assign(T& s, const char* psz) 00009 { 00010 if (psz) 00011 s = psz; 00012 else 00013 s = ""; 00014 } 00015 00016 #endif // SAFE_ASSIGN_H
1.4.3