[asterisk-scf-commits] asterisk-scf/release/matroska.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Aug 10 15:49:30 CDT 2011


branch "master" has been updated
       via  51d54a8fd4d47898d9781183b449abf567bdc2ff (commit)
      from  227519bf8a4a3b2db287a2f1823ac8961773e3f1 (commit)

Summary of changes:
 libebml/src/EbmlCrc32.cpp         |    8 ++++----
 libebml/src/EbmlDate.cpp          |    4 ++--
 libebml/src/EbmlFloat.cpp         |    6 +++---
 libebml/src/EbmlSInteger.cpp      |    4 ++--
 libebml/src/EbmlString.cpp        |    4 ++--
 libebml/src/EbmlUInteger.cpp      |    4 ++--
 libebml/src/EbmlUnicodeString.cpp |    2 +-
 libebml/src/EbmlVoid.cpp          |    2 +-
 libebml/src/IOCallback.cpp        |    2 +-
 9 files changed, 18 insertions(+), 18 deletions(-)


- Log -----------------------------------------------------------------
commit 51d54a8fd4d47898d9781183b449abf567bdc2ff
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Aug 10 18:19:16 2011 -0230

    More casts! <gasp!>

diff --git a/libebml/src/EbmlCrc32.cpp b/libebml/src/EbmlCrc32.cpp
index ad6c79b..baf873e 100644
--- a/libebml/src/EbmlCrc32.cpp
+++ b/libebml/src/EbmlCrc32.cpp
@@ -212,15 +212,15 @@ filepos_t EbmlCrc32::RenderData(IOCallback & output, bool, bool)
 	filepos_t Result = 4;
 
 	if (Result != 0) {
-	    output.writeFully(&m_crc_final, Result);
+	    output.writeFully(&m_crc_final, static_cast<size_t>(Result));
 	}
 
 	if (Result < GetDefaultSize()) {
 		// pad the rest with 0
 		binary *Pad = new binary[GetDefaultSize() - Result];
 		if (Pad != NULL) {
-			memset(Pad, 0x00, GetDefaultSize() - Result);
-			output.writeFully(Pad, GetDefaultSize() - Result);
+			memset(Pad, 0x00, static_cast<size_t>(GetDefaultSize() - Result));
+			output.writeFully(Pad, static_cast<size_t>(GetDefaultSize() - Result));
 
 			Result = GetDefaultSize();
 			delete [] Pad;
@@ -239,7 +239,7 @@ filepos_t EbmlCrc32::ReadData(IOCallback & input, ScopeMode ReadFully)
 			// impossible to read, skip it
 			input.setFilePointer(GetSize(), seek_current);
 		} else {
-			input.readFully(Buffer, GetSize());
+			input.readFully(Buffer, static_cast<size_t>(GetSize()));
 
 			memcpy((void *)&m_crc_final, Buffer, 4);
 			delete [] Buffer;
diff --git a/libebml/src/EbmlDate.cpp b/libebml/src/EbmlDate.cpp
index 517b4da..e1b1162 100644
--- a/libebml/src/EbmlDate.cpp
+++ b/libebml/src/EbmlDate.cpp
@@ -52,7 +52,7 @@ filepos_t EbmlDate::ReadData(IOCallback & input, ScopeMode ReadFully)
 		if (GetSize() != 0) {
 			assert(GetSize() == 8);
 			binary Buffer[8];
-			input.readFully(Buffer, GetSize());
+			input.readFully(Buffer, static_cast<size_t>(GetSize()));
 
 			big_int64 b64;
 			b64.Eval(Buffer);
@@ -71,7 +71,7 @@ filepos_t EbmlDate::RenderData(IOCallback & output, bool, bool)
 		assert(GetSize() == 8);
 		big_int64 b64(myDate);
 
-		output.writeFully(&b64.endian(),GetSize());
+		output.writeFully(&b64.endian(), static_cast<size_t>(GetSize()));
 	}
 
 	return GetSize();
diff --git a/libebml/src/EbmlFloat.cpp b/libebml/src/EbmlFloat.cpp
index 1fcd696..74a9116 100644
--- a/libebml/src/EbmlFloat.cpp
+++ b/libebml/src/EbmlFloat.cpp
@@ -90,13 +90,13 @@ filepos_t EbmlFloat::RenderData(IOCallback & output, bool, bool)
 		int Tmp;
 		memcpy(&Tmp, &val, 4);
 		big_int32 TmpToWrite(Tmp);
-		output.writeFully(&TmpToWrite.endian(), GetSize());
+		output.writeFully(&TmpToWrite.endian(), static_cast<size_t>(GetSize()));
 	} else if (GetSize() == 8) {
 		double val = Value;
 		int64 Tmp;
 		memcpy(&Tmp, &val, 8);
 		big_int64 TmpToWrite(Tmp);
-		output.writeFully(&TmpToWrite.endian(), GetSize());
+		output.writeFully(&TmpToWrite.endian(), static_cast<size_t>(GetSize()));
 	}
 
 	return GetSize();
@@ -118,7 +118,7 @@ filepos_t EbmlFloat::ReadData(IOCallback & input, ScopeMode ReadFully)
 	{
 		binary Buffer[20];
 		assert(GetSize() <= 20);
-		input.readFully(Buffer, GetSize());
+		input.readFully(Buffer, static_cast<size_t>(GetSize()));
 
 		if (GetSize() == 4) {
 			big_int32 TmpRead;
diff --git a/libebml/src/EbmlSInteger.cpp b/libebml/src/EbmlSInteger.cpp
index 8456731..f10fbfa 100644
--- a/libebml/src/EbmlSInteger.cpp
+++ b/libebml/src/EbmlSInteger.cpp
@@ -77,7 +77,7 @@ filepos_t EbmlSInteger::RenderData(IOCallback & output, bool, bool)
 		TempValue >>= 8;
 	}
 	
-	output.writeFully(FinalData,GetSize());
+	output.writeFully(FinalData, static_cast<size_t>(GetSize()));
 
 	return GetSize();
 }
@@ -120,7 +120,7 @@ filepos_t EbmlSInteger::ReadData(IOCallback & input, ScopeMode ReadFully)
 	if (ReadFully != SCOPE_NO_DATA)
 	{
 		binary Buffer[8];
-		input.readFully(Buffer, GetSize());
+		input.readFully(Buffer, static_cast<size_t>(GetSize()));
 		
 		if (Buffer[0] & 0x80)
 			Value = -1; // this is a negative value
diff --git a/libebml/src/EbmlString.cpp b/libebml/src/EbmlString.cpp
index 1e31020..813285f 100644
--- a/libebml/src/EbmlString.cpp
+++ b/libebml/src/EbmlString.cpp
@@ -90,7 +90,7 @@ const std::string & EbmlString::DefaultVal() const
 filepos_t EbmlString::RenderData(IOCallback & output, bool, bool)
 {
 	filepos_t Result;
-	output.writeFully(Value.c_str(), Value.length());
+	output.writeFully(Value.c_str(), static_cast<size_t>(Value.length()));
 	Result = Value.length();
 	
 	if (Result < GetDefaultSize()) {
@@ -148,7 +148,7 @@ filepos_t EbmlString::ReadData(IOCallback & input, ScopeMode ReadFully)
 				// unable to store the data, skip it
 				input.setFilePointer(GetSize(), seek_current);
 			} else {
-				input.readFully(Buffer, GetSize());
+				input.readFully(Buffer, static_cast<size_t>(GetSize()));
 				if (Buffer[GetSize()-1] != '\0') {
 					Buffer[GetSize()] = '\0';
 				}
diff --git a/libebml/src/EbmlUInteger.cpp b/libebml/src/EbmlUInteger.cpp
index 4b77cd1..acb3636 100644
--- a/libebml/src/EbmlUInteger.cpp
+++ b/libebml/src/EbmlUInteger.cpp
@@ -92,7 +92,7 @@ filepos_t EbmlUInteger::RenderData(IOCallback & output, bool, bool)
 		TempValue >>= 8;
 	}
 	
-	output.writeFully(FinalData,GetSize());
+	output.writeFully(FinalData, static_cast<size_t>(GetSize()));
 
 	return GetSize();
 }
@@ -132,7 +132,7 @@ filepos_t EbmlUInteger::ReadData(IOCallback & input, ScopeMode ReadFully)
 	if (ReadFully != SCOPE_NO_DATA)
 	{
 		binary Buffer[8];
-		input.readFully(Buffer, GetSize());
+		input.readFully(Buffer, static_cast<size_t>(GetSize()));
 		Value = 0;
 		
 		for (unsigned int i=0; i<GetSize(); i++)
diff --git a/libebml/src/EbmlUnicodeString.cpp b/libebml/src/EbmlUnicodeString.cpp
index 59df085..6ecf9d7 100644
--- a/libebml/src/EbmlUnicodeString.cpp
+++ b/libebml/src/EbmlUnicodeString.cpp
@@ -319,7 +319,7 @@ filepos_t EbmlUnicodeString::ReadData(IOCallback & input, ScopeMode ReadFully)
 				// impossible to read, skip it
 				input.setFilePointer(GetSize(), seek_current);
 			} else {
-				input.readFully(Buffer, GetSize());
+				input.readFully(Buffer, static_cast<size_t>(GetSize()));
 				if (Buffer[GetSize()-1] != 0) {
 					Buffer[GetSize()] = 0;
 				}
diff --git a/libebml/src/EbmlVoid.cpp b/libebml/src/EbmlVoid.cpp
index 519394c..72aeb97 100644
--- a/libebml/src/EbmlVoid.cpp
+++ b/libebml/src/EbmlVoid.cpp
@@ -56,7 +56,7 @@ filepos_t EbmlVoid::RenderData(IOCallback & output, bool, bool)
 		output.writeFully(DummyBuf, 4*1024);
 		SizeToWrite -= 4*1024;
 	}
-	output.writeFully(DummyBuf, SizeToWrite);
+	output.writeFully(DummyBuf, static_cast<size_t>(SizeToWrite));
 	return GetSize();
 }
 
diff --git a/libebml/src/IOCallback.cpp b/libebml/src/IOCallback.cpp
index 77c5871..9070f7a 100644
--- a/libebml/src/IOCallback.cpp
+++ b/libebml/src/IOCallback.cpp
@@ -65,7 +65,7 @@ void IOCallback::writeFully(const void*Buffer,size_t Size)
 
 
 
-void IOCallback::readFully(void*Buffer,size_t Size)
+void IOCallback::readFully(void*Buffer, size_t Size)
 {
 	if(Buffer == NULL)
 		throw;

-----------------------------------------------------------------------


-- 
asterisk-scf/release/matroska.git



More information about the asterisk-scf-commits mailing list