|
From: <bul...@us...> - 2013-05-18 19:54:08
|
Revision: 22763
http://sourceforge.net/p/bzflag/code/22763
Author: bullet_catcher
Date: 2013-05-18 19:54:06 +0000 (Sat, 18 May 2013)
Log Message:
-----------
Preserve const quality in API.
Modified Paths:
--------------
trunk/bzflag/include/bzfsAPI.h
trunk/bzflag/src/bzfs/bzfsAPI.cxx
trunk/bzflag/src/bzfs/bzfsHTTPAPI.cxx
Modified: trunk/bzflag/include/bzfsAPI.h
===================================================================
--- trunk/bzflag/include/bzfsAPI.h 2013-05-17 20:26:04 UTC (rev 22762)
+++ trunk/bzflag/include/bzfsAPI.h 2013-05-18 19:54:06 UTC (rev 22763)
@@ -1621,7 +1621,7 @@
public:
bz_BaseURLHandler() { version = 1; }
virtual ~bz_BaseURLHandler(){};
- virtual void URLDone ( const char* URL, void * data, unsigned int size, bool complete ) = 0;
+ virtual void URLDone ( const char* URL, const void * data, unsigned int size, bool complete ) = 0;
virtual void URLTimeout ( const char* /*URL*/, int /*errorCode*/ ){};
virtual void URLError ( const char* /*URL*/, int /*errorCode*/, const char * /*errorString*/ ){};
Modified: trunk/bzflag/src/bzfs/bzfsAPI.cxx
===================================================================
--- trunk/bzflag/src/bzfs/bzfsAPI.cxx 2013-05-17 20:26:04 UTC (rev 22762)
+++ trunk/bzflag/src/bzfs/bzfsAPI.cxx 2013-05-18 19:54:06 UTC (rev 22763)
@@ -69,7 +69,7 @@
doNext();
}
- virtual void URLDone ( const char*, void * data, unsigned int size, bool complete )
+ virtual void URLDone ( const char*, const void * data, unsigned int size, bool complete )
{
if (!busy)
return;
@@ -821,7 +821,7 @@
chunkSize = (left < maxNonPlayerDataChunk) ? left : maxNonPlayerDataChunk;
- peer->sendChunks.push_back(std::string((char*)data + pos, chunkSize));
+ peer->sendChunks.push_back(std::string((const char*)data + pos, chunkSize));
}
// send off at least one now if it was empty
@@ -3024,7 +3024,7 @@
((bz_URLHandler_V2*)Tasks[0].handler)->token = Tasks[0].token;
}
if (bufferedJobData.size())
- Tasks[0].handler->URLDone(Tasks[0].url.c_str(),(void*)bufferedJobData.c_str(),bufferedJobData.size(),true);
+ Tasks[0].handler->URLDone(Tasks[0].url.c_str(),bufferedJobData.c_str(),bufferedJobData.size(),true);
else
Tasks[0].handler->URLError(Tasks[0].url.c_str(),1,"Error");
Modified: trunk/bzflag/src/bzfs/bzfsHTTPAPI.cxx
===================================================================
--- trunk/bzflag/src/bzfs/bzfsHTTPAPI.cxx 2013-05-17 20:26:04 UTC (rev 22762)
+++ trunk/bzflag/src/bzfs/bzfsHTTPAPI.cxx 2013-05-18 19:54:06 UTC (rev 22763)
@@ -758,7 +758,7 @@
list[n] = std::string(d);
}
- virtual void URLDone (const char*, void *data, unsigned int size, bool complete)
+ virtual void URLDone (const char*, const void *data, unsigned int size, bool complete)
{
if (data && size)
bzAuthReturnData += std::string((const char*)data,size);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|