You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/03/20 23:37:59 UTC
svn commit: r925699 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main:
activemq/wireformat/openwire/utils/ activemq/wireformat/stomp/
decaf/internal/util/ decaf/io/ decaf/lang/ decaf/net/ decaf/nio/
decaf/util/ decaf/util/logging/ decaf/util/zip/
Author: tabish
Date: Sat Mar 20 22:37:58 2010
New Revision: 925699
URL: http://svn.apache.org/viewvc?rev=925699&view=rev
Log:
Fix warning on Windows build
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/BooleanStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/ByteArrayAdapter.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataOutputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/InputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Reader.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Writer.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/String.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/nio/CharBuffer.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/BooleanStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/BooleanStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/BooleanStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/utils/BooleanStream.cpp Sat Mar 20 22:37:58 2010
@@ -106,7 +106,7 @@ void BooleanStream::marshal( DataOutputS
}
// Dump the payload
- dataOut->write( &data[0], data.size(), 0, arrayLimit );
+ dataOut->write( &data[0], (int)data.size(), 0, arrayLimit );
clear();
}
AMQ_CATCH_RETHROW( IOException )
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/stomp/StompFrame.cpp Sat Mar 20 22:37:58 2010
@@ -73,7 +73,7 @@ void StompFrame::toStream( decaf::io::Da
// Write the command.
const string& cmdString = this->getCommand();
- stream->write( (unsigned char*)cmdString.c_str(), cmdString.length(), 0, cmdString.length() );
+ stream->write( (unsigned char*)cmdString.c_str(), (int)cmdString.length(), 0, (int)cmdString.length() );
stream->write( '\n' );
// Write all the headers.
@@ -82,9 +82,9 @@ void StompFrame::toStream( decaf::io::Da
string& name = headers[ix].first;
string& value = headers[ix].second;
- stream->write( (unsigned char*)name.c_str(), name.length(), 0, name.length() );
+ stream->write( (unsigned char*)name.c_str(), (int)name.length(), 0, (int)name.length() );
stream->write( ':' );
- stream->write( (unsigned char*)value.c_str(), value.length(), 0, value.length() );
+ stream->write( (unsigned char*)value.c_str(), (int)value.length(), 0, (int)value.length() );
stream->write( '\n' );
}
@@ -94,7 +94,7 @@ void StompFrame::toStream( decaf::io::Da
// Write the body.
const std::vector<unsigned char>& body = this->getBody();
if( body.size() > 0 ) {
- stream->write( &body[0], body.size(), 0, body.size() );
+ stream->write( &body[0], (int)body.size(), 0, (int)body.size() );
}
if( ( this->getBodyLength() == 0 ) ||
@@ -302,7 +302,7 @@ void StompFrame::readBody( decaf::io::Da
this->body.resize( (std::size_t)content_length );
// Read the Content Length now
- in->read( &body[0], body.size(), 0, content_length );
+ in->read( &body[0], (int)body.size(), 0, content_length );
// Content Length read, now pop the end terminator off (\0\n).
if( in->readByte() != '\0' ) {
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/ByteArrayAdapter.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/ByteArrayAdapter.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/ByteArrayAdapter.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/ByteArrayAdapter.cpp Sat Mar 20 22:37:58 2010
@@ -467,7 +467,7 @@ long long ByteArrayAdapter::getLongAt( i
try{
- if( ( index < 0 || index + sizeof( long long ) ) > this->getCapacity() ) {
+ if( index < 0 || ( index + (int)sizeof( long long ) ) > this->getCapacity() ) {
throw IndexOutOfBoundsException(
__FILE__, __LINE__,
"ByteArrayAdapter::getLong(i) - Not enough data to fill a long long." );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/BufferedInputStream.cpp Sat Mar 20 22:37:58 2010
@@ -425,7 +425,7 @@ long long BufferedInputStream::skip( lon
}
if( streamBuffer->available() >= amount ) {
- streamBuffer->advance( amount );
+ streamBuffer->advance( (int)amount );
return amount;
}
@@ -441,8 +441,8 @@ long long BufferedInputStream::skip( lon
return read;
}
- if( streamBuffer->available() >= ( amount - read ) ) {
- streamBuffer->advance( amount - read );
+ if( streamBuffer->available() >= ( (int)amount - read ) ) {
+ streamBuffer->advance( (int)amount - read );
return amount;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/ByteArrayOutputStream.cpp Sat Mar 20 22:37:58 2010
@@ -128,7 +128,7 @@ std::string ByteArrayOutputStream::toStr
return "";
}
- return string( (const char*)this->toByteArray(), this->size() );
+ return string( (const char*)this->toByteArray(), (std::size_t)this->size() );
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataInputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataInputStream.cpp Sat Mar 20 22:37:58 2010
@@ -197,10 +197,10 @@ std::string DataInputStream::readString(
"DataInputStream::readFully - Base input stream is null" );
}
- size_t size = 1024;
+ int size = 1024;
std::vector<char> buffer;
buffer.resize( size );
- size_t pos = 0;
+ int pos = 0;
while( true ) {
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataOutputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/DataOutputStream.cpp Sat Mar 20 22:37:58 2010
@@ -276,7 +276,7 @@ void DataOutputStream::writeBytes( const
}
// do not add one so that we don't write the NULL
- this->write( (const unsigned char*)value.c_str(), value.length(), 0, value.length() );
+ this->write( (const unsigned char*)value.c_str(), (int)value.length(), 0, (int)value.length() );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -291,7 +291,7 @@ void DataOutputStream::writeChars( const
}
// add one so that we write the NULL
- this->write( (const unsigned char*)value.c_str(), value.length() + 1, 0, value.length() + 1 );
+ this->write( (const unsigned char*)value.c_str(), (int)value.length() + 1, 0, (int)value.length() + 1 );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/InputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/InputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/InputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/InputStream.cpp Sat Mar 20 22:37:58 2010
@@ -110,7 +110,7 @@ long long InputStream::skip( long long n
// Lets not try and buffer every byte since it could be as large as
// whatever size_t is on this platform, read the data in reasonable
// chunks until finished.
- int toRead = num < 4096 ? num : 4096;
+ int toRead = num < 4096LL ? (int)num : 4096;
std::vector<unsigned char> buffer( toRead );
while( skipped < num ) {
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Reader.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Reader.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Reader.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Reader.cpp Sat Mar 20 22:37:58 2010
@@ -166,7 +166,7 @@ int Reader::doReadVector( std::vector<ch
return -1;
}
- return this->doReadArrayBounded( &buffer[0], buffer.size(), 0, buffer.size() );
+ return this->doReadArrayBounded( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -230,7 +230,7 @@ int Reader::doReadCharBuffer( decaf::nio
length = Math::min( length, this->doReadVector( buffer ) );
if( length > 0 ) {
- charBuffer->put( &buffer[0], buffer.size() , 0, length );
+ charBuffer->put( &buffer[0], (int)buffer.size() , 0, length );
}
return length;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Writer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Writer.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Writer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/io/Writer.cpp Sat Mar 20 22:37:58 2010
@@ -152,7 +152,7 @@ void Writer::doWriteVector( const std::v
throw( decaf::io::IOException ) {
try {
- this->doWriteArrayBounded( &buffer[0], buffer.size(), 0, buffer.size() );
+ this->doWriteArrayBounded( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -175,7 +175,7 @@ void Writer::doWriteArray( const char* b
void Writer::doWriteString( const std::string& str ) throw( decaf::io::IOException ) {
try {
- this->doWriteArrayBounded( str.c_str(), str.length(), 0, str.length() );
+ this->doWriteArrayBounded( str.c_str(), (int)str.length(), 0, (int)str.length() );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCHALL_THROW( IOException )
@@ -187,7 +187,7 @@ void Writer::doWriteStringBounded( const
decaf::lang::exceptions::IndexOutOfBoundsException ) {
try {
- this->doWriteArrayBounded( str.c_str(), str.length(), offset, length );
+ this->doWriteArrayBounded( str.c_str(), (int)str.length(), offset, length );
}
DECAF_CATCH_RETHROW( IOException )
DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/String.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/String.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/String.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/String.cpp Sat Mar 20 22:37:58 2010
@@ -58,7 +58,7 @@ String::String() {
String::String( const std::string& source ) {
// Initialize the contents object.
- this->contents = new Contents( source.length() );
+ this->contents = new Contents( (int)source.length() );
// load the passed string into the contents value.
System::arraycopy( (unsigned char*)source.c_str(), 0, contents->value.get(), 0, source.length() );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketInputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/net/SocketInputStream.cpp Sat Mar 20 22:37:58 2010
@@ -92,7 +92,7 @@ int SocketInputStream::available() const
throw SocketException( __FILE__, __LINE__, "ioctlsocket failed" );
}
- return (std::size_t)numBytes;
+ return numBytes;
#else // !defined(HAVE_WINSOCK2_H)
@@ -100,7 +100,7 @@ int SocketInputStream::available() const
// are available.
#if defined(FIONREAD)
- std::size_t numBytes = 0;
+ int numBytes = 0;
if( ::ioctl( oss, FIONREAD, &numBytes ) != -1 ){
return numBytes;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/nio/CharBuffer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/nio/CharBuffer.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/nio/CharBuffer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/nio/CharBuffer.cpp Sat Mar 20 22:37:58 2010
@@ -379,7 +379,7 @@ CharBuffer& CharBuffer::put( const std::
try{
if( !src.empty() ) {
- this->put( src.c_str(), src.size(), 0, src.size() );
+ this->put( src.c_str(), (int)src.size(), 0, (int)src.size() );
}
return *this;
@@ -411,12 +411,10 @@ int CharBuffer::read( CharBuffer* target
}
if( this->remaining() == 0 ) {
- return target->remaining() == 0 ? 0 : string::npos;
+ return target->remaining() == 0 ? 0 : -1;
}
- int result = (int)Math::min(
- (int)target->remaining(),
- (int)this->remaining() );
+ int result = (int)Math::min( (int)target->remaining(), (int)this->remaining() );
std::vector<char> chars( result, 0 );
get( &chars[0], result, 0, result );
target->put( &chars[0], result, 0, result );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Properties.cpp Sat Mar 20 22:37:58 2010
@@ -552,7 +552,7 @@ void Properties::store( decaf::io::Outpu
buffer.str("");
}
- std::size_t length = writer.str().length();
+ int length = (int)writer.str().length();
out->write( (const unsigned char*)writer.str().c_str(), length, 0, length );
out->flush();
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.cpp Sat Mar 20 22:37:58 2010
@@ -171,7 +171,7 @@ void StreamHandler::close( bool closeStr
void StreamHandler::write( const std::string& value ) {
try{
- this->stream->write( (const unsigned char*)value.c_str(), value.length(), 0, value.length() );
+ this->stream->write( (const unsigned char*)value.c_str(), (int)value.length(), 0, (int)value.length() );
} catch( Exception& e ) {
this->getErrorManager()->error(
"Failed to write to the OutputStream", &e, ErrorManager::WRITE_FAILURE );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp Sat Mar 20 22:37:58 2010
@@ -76,7 +76,7 @@ long long CheckedInputStream::skip( long
this->sum->update( buffer, 0, remaining );
skipped += result;
- remaining = ( num - skipped ) > (long long)buffer.size() ? (int)buffer.size() : num - skipped;
+ remaining = ( num - skipped ) > (long long)buffer.size() ? (int)buffer.size() : (int)(num - skipped);
}
return skipped;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp Sat Mar 20 22:37:58 2010
@@ -222,7 +222,7 @@ void Deflater::setInput( const std::vect
throw( decaf::lang::exceptions::IndexOutOfBoundsException,
decaf::lang::exceptions::IllegalStateException ) {
- this->setInput( &buffer[0], buffer.size(), offset, length );
+ this->setInput( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -233,7 +233,7 @@ void Deflater::setInput( const std::vect
return;
}
- this->setInput( &buffer[0], buffer.size(), 0, buffer.size() );
+ this->setInput( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
@@ -280,7 +280,7 @@ void Deflater::setDictionary( const std:
throw( decaf::lang::exceptions::IndexOutOfBoundsException,
decaf::lang::exceptions::IllegalStateException ) {
- this->setDictionary( &buffer[0], buffer.size(), offset, length );
+ this->setDictionary( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -291,7 +291,7 @@ void Deflater::setDictionary( const std:
return;
}
- this->setDictionary( &buffer[0], buffer.size(), 0, buffer.size() );
+ this->setDictionary( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
@@ -407,14 +407,14 @@ int Deflater::deflate( std::vector<unsig
throw( decaf::lang::exceptions::IndexOutOfBoundsException,
decaf::lang::exceptions::IllegalStateException ) {
- return this->deflate( &buffer[0], buffer.size(), offset, length );
+ return this->deflate( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
int Deflater::deflate( std::vector<unsigned char>& buffer )
throw( decaf::lang::exceptions::IllegalStateException ){
- return this->deflate( &buffer[0], buffer.size(), 0, buffer.size() );
+ return this->deflate( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/DeflaterOutputStream.cpp Sat Mar 20 22:37:58 2010
@@ -104,8 +104,8 @@ void DeflaterOutputStream::finish() thro
if( this->deflater->needsInput() ) {
this->deflater->setInput( buf, 0, 0 );
}
- result = this->deflater->deflate( &buf[0], buf.size(), 0, buf.size() );
- this->outputStream->write( &buf[0], buf.size(), 0, result );
+ result = this->deflater->deflate( &buf[0], (int)buf.size(), 0, (int)buf.size() );
+ this->outputStream->write( &buf[0], (int)buf.size(), 0, result );
}
this->isDone = true;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp Sat Mar 20 22:37:58 2010
@@ -190,7 +190,7 @@ void Inflater::setInput( const std::vect
return;
}
- this->setInput( &buffer[0], buffer.size(), offset, length );
+ this->setInput( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -201,7 +201,7 @@ void Inflater::setInput( const std::vect
return;
}
- this->setInput( &buffer[0], buffer.size(), 0, buffer.size() );
+ this->setInput( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
@@ -266,7 +266,7 @@ void Inflater::setDictionary( const std:
return;
}
- this->setDictionary( &buffer[0], buffer.size(), offset, length );
+ this->setDictionary( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -278,7 +278,7 @@ void Inflater::setDictionary( const std:
return;
}
- this->setDictionary( &buffer[0], buffer.size(), 0, buffer.size() );
+ this->setDictionary( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
@@ -382,7 +382,7 @@ int Inflater::inflate( std::vector<unsig
return 0;
}
- return this->inflate( &buffer[0], buffer.size(), offset, length );
+ return this->inflate( &buffer[0], (int)buffer.size(), offset, length );
}
////////////////////////////////////////////////////////////////////////////////
@@ -394,7 +394,7 @@ int Inflater::inflate( std::vector<unsig
return 0;
}
- return this->inflate( &buffer[0], buffer.size(), 0, buffer.size() );
+ return this->inflate( &buffer[0], (int)buffer.size(), 0, (int)buffer.size() );
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.cpp Sat Mar 20 22:37:58 2010
@@ -28,7 +28,7 @@ using namespace decaf::util;
using namespace decaf::util::zip;
////////////////////////////////////////////////////////////////////////////////
-const std::size_t InflaterInputStream::DEFAULT_BUFFER_SIZE = 512;
+const int InflaterInputStream::DEFAULT_BUFFER_SIZE = 512;
////////////////////////////////////////////////////////////////////////////////
InflaterInputStream::InflaterInputStream( InputStream* inputStream, bool own ) :
@@ -119,10 +119,10 @@ long long InflaterInputStream::skip( lon
long long count = 0;
long long remaining = (std::size_t)Math::min( num, (long long)buff.size() );
- std::vector<unsigned char> buffer( remaining );
+ std::vector<unsigned char> buffer( (std::size_t)remaining );
while( count < num ) {
- int x = read( &buffer[0], buffer.size() , 0, remaining );
+ int x = read( &buffer[0], (int)buffer.size() , 0, (int)remaining );
if( x == -1 ) {
return count;
}
@@ -287,10 +287,10 @@ void InflaterInputStream::fill() throw (
}
// Try and fill the input buffer, whatever we get goes into the inflater.
- length = inputStream->read( &buff[0], buff.size(), 0, buff.size() );
+ length = inputStream->read( &buff[0], (int)buff.size(), 0, (int)buff.size() );
if( length > 0 ) {
- inflater->setInput( &buff[0], buff.size(), 0, length );
+ inflater->setInput( &buff[0], (int)buff.size(), 0, length );
}
}
DECAF_CATCH_RETHROW( IOException )
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.h?rev=925699&r1=925698&r2=925699&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/InflaterInputStream.h Sat Mar 20 22:37:58 2010
@@ -56,7 +56,7 @@ namespace zip {
bool ownInflater;
bool atEOF;
- static const std::size_t DEFAULT_BUFFER_SIZE;
+ static const int DEFAULT_BUFFER_SIZE;
public: