From 11d7adb04c0408b1f5f92c57ca9f3a2cf683d2cf Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 13 Sep 2014 21:23:47 +0000 Subject: [PATCH] EgtGeneral : - Spostato nell'header il corpo di ToString per interi. --- StringUtils.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/StringUtils.cpp b/StringUtils.cpp index 4072aca..04450ef 100644 --- a/StringUtils.cpp +++ b/StringUtils.cpp @@ -20,34 +20,6 @@ using namespace std ; -//---------------------------------------------------------------------------- -const string -ToString( int nVal, int nPrec) -{ - int nErr ; - int nLen ; - char szBuff[24] ; - - - // eseguo conversione - nErr = _itoa_s( nVal, szBuff, 10) ; - - // se errore, ritorno stringa opportuna - if ( nErr != 0) { - _ASSERT( 0) ; - return "#Error" ; - } - - // verifico lunghezza minima - if ( ( nLen = (int) strlen( szBuff)) >= nPrec) - return szBuff ; - - // porto la stringa alla minima lunghezza - string sBuff( szBuff) ; - sBuff.insert( 0, ( nPrec - nLen), '0') ; - return sBuff ; -} - //---------------------------------------------------------------------------- const string ToString( double dVal, int nPrec)