From: <ag...@us...> - 2011-06-26 19:56:31
|
Revision: 2236 http://zoolib.svn.sourceforge.net/zoolib/?rev=2236&view=rev Author: agreen Date: 2011-06-26 19:56:25 +0000 (Sun, 26 Jun 2011) Log Message: ----------- Make use of ZVal_Any shortcut accessors. Modified Paths: -------------- trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp Modified: trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp 2011-06-26 19:55:34 UTC (rev 2235) +++ trunk/zoolib/source/cxx/zoolib/ZHTTP.cpp 2011-06-26 19:56:25 UTC (rev 2236) @@ -51,12 +51,7 @@ #pragma mark * Utility stuff static void spAppend(Map& ioFields, const string& iName, const Val& iValue) - { - Seq theSeq = ioFields.Get(iName).Get<Seq>(); - theSeq.Append(iValue); - ioFields.Set(iName, theSeq); -// ioFields.Mutable(iName).MutableSeq().Append(iValue); - } + { ioFields.Set(iName, ioFields.Get<Seq>(iName).Append(iValue)); } static uint32 spHexCharToUInt(char iChar) { @@ -735,7 +730,7 @@ const Seq& theSeq = iVal.GetSeq(); if (theSeq.Count()) - return theSeq.Get(0).Get<string>(); + return theSeq.Get<string>(0); return string(); } @@ -750,7 +745,7 @@ if (ZUtil_string::sContainsi("chunked", sGetString0(iHeader.Get("transfer-encoding")))) return new ZStreamerR_FT<StreamR_Chunked>(iStreamerR); - if (ZQ<int64> contentLength = iHeader.Get("content-length").QGet<int64>()) + if (ZQ<int64> contentLength = iHeader.QGet<int64>("content-length")) return new ZStreamerR_FT<ZStreamR_Limited>(contentLength.Get(), iStreamerR); return iStreamerR; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |