summaryrefslogtreecommitdiffstats
path: root/parameter/BinaryStream.cpp
diff options
context:
space:
mode:
authorPatrick Benavoli <patrick.benavoli@intel.com>2014-07-23 01:27:00 +0200
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:13 -0700
commit911844b16c6b627f421bc3368de427de3ca9f60c (patch)
tree223697b3ea168eca090cd06a673c7dbb7dea27de /parameter/BinaryStream.cpp
parent9ad87f08eb4cfa8752f4b9e7b9deb3bd219ff591 (diff)
downloadexternal_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.zip
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.gz
external_parameter-framework-911844b16c6b627f421bc3368de427de3ca9f60c.tar.bz2
Type mismatch corrections (Windows 64 bits)
This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
Diffstat (limited to 'parameter/BinaryStream.cpp')
-rw-r--r--parameter/BinaryStream.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/parameter/BinaryStream.cpp b/parameter/BinaryStream.cpp
index 701e9b8..2dc3380 100644
--- a/parameter/BinaryStream.cpp
+++ b/parameter/BinaryStream.cpp
@@ -33,7 +33,7 @@
using namespace std;
-CBinaryStream::CBinaryStream(const string& strFileName, bool bOut, uint32_t uiDataSize, uint8_t uiStructureChecksum) :
+CBinaryStream::CBinaryStream(const string& strFileName, bool bOut, size_t uiDataSize, uint8_t uiStructureChecksum) :
_strFileName(strFileName),
_bOut(bOut),
_uiDataSize(uiDataSize),
@@ -69,10 +69,10 @@ bool CBinaryStream::open(string& strError)
if (!_bOut) {
// Get file size
- ifstream::pos_type uiFileSize = _fileStream.tellg();
+ size_t uiFileSize = _fileStream.tellg();
// Validate file size
- if (_uiDataSize + sizeof(_uiStructureChecksum) != (uint32_t)uiFileSize) {
+ if (_uiDataSize + sizeof(_uiStructureChecksum) != uiFileSize) {
// Size different from expected
strError = "Unexpected file size";
@@ -136,7 +136,7 @@ void CBinaryStream::reset()
_uiPos = 0;
}
-void CBinaryStream::write(const uint8_t* puiData, uint32_t uiSize)
+void CBinaryStream::write(const uint8_t* puiData, size_t uiSize)
{
assert(_uiPos + uiSize <= _uiDataSize);
@@ -145,7 +145,7 @@ void CBinaryStream::write(const uint8_t* puiData, uint32_t uiSize)
_uiPos += uiSize;
}
-void CBinaryStream::read(uint8_t* puiData, uint32_t uiSize)
+void CBinaryStream::read(uint8_t* puiData, size_t uiSize)
{
assert(_uiPos + uiSize <= _uiDataSize);