2012-10-12 14:19 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbhttpd/core.prg
* contrib/hbhttpd/widgets.prg
* contrib/hbpgsql/tests/cache.prg
* extras/hbxlsxml/xlsxml_s.prg
* extras/hbxlsxml/xlsxml_y.prg
* extras/hbxlsxml/xlsxml.prg
* extras/httpsrv/cgifunc.prg
* extras/httpsrv/cookie.prg
* extras/httpsrv/session.prg
* extras/httpsrv/uhttpd.prg
* src/rtl/dirscan.prg
% LTRIM(STR(x,y)) converted to hb_ntos() where y had
no significance or just limited the width unnecessarily
% ValType() usage converted to HB_IS*() or optimized
by rearragement of code or using SWITCH/CASE
This commit is contained in:
@@ -1820,11 +1820,12 @@ FUNCTION uhttpd_join( cSeparator, aData )
|
||||
FOR nI := 1 TO LEN( aData )
|
||||
IF nI > 1; cRet += cSeparator
|
||||
ENDIF
|
||||
IF VALTYPE(aData[ nI ]) $ "CM"; cRet += aData[ nI ]
|
||||
ELSEIF VALTYPE(aData[ nI ]) == "N"; cRet += LTRIM(STR(aData[ nI ]))
|
||||
ELSEIF VALTYPE(aData[ nI ]) == "D"; cRet += iif(!EMPTY(aData[ nI ]), DTOC(aData[ nI ]), "")
|
||||
ELSE
|
||||
ENDIF
|
||||
SWITCH VALTYPE( aData[ nI ] )
|
||||
CASE "C"
|
||||
CASE "M"; cRet += aData[ nI ]; EXIT
|
||||
CASE "N"; cRet += LTRIM(STR(aData[ nI ])); EXIT
|
||||
CASE "D"; cRet += iif(!EMPTY(aData[ nI ]), DTOC(aData[ nI ]), ""); EXIT
|
||||
ENDSWITCH
|
||||
NEXT
|
||||
RETURN cRet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user