summaryrefslogtreecommitdiff
path: root/src/KM_memio.h
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2011-03-07 06:46:37 +0000
committerjhurst <>2011-03-07 06:46:37 +0000
commit3feb7cc3f014bf1b2806b3b6819d80d684434e8f (patch)
tree64743b6125d263fbb47a98caec9bf362c999936d /src/KM_memio.h
parent8ebc231b320ff27a5b624b32af66b0127bcf8358 (diff)
*** empty log message ***
Diffstat (limited to 'src/KM_memio.h')
-rwxr-xr-xsrc/KM_memio.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/KM_memio.h b/src/KM_memio.h
index 5349749..defea5e 100755
--- a/src/KM_memio.h
+++ b/src/KM_memio.h
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2006-2010, John Hurst
+Copyright (c) 2006-2011, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -122,10 +122,10 @@ namespace Kumu
return true;
}
- inline bool WriteString(const std::string& str)
- {
- if ( ! WriteUi32BE(str.length()) ) return false;
- if ( ! WriteRaw((const byte_t*)str.c_str(), str.length()) ) return false;
+ inline bool WriteString(const std::string& str) {
+ ui32_t len = static_cast<ui32_t>(str.length());
+ if ( ! WriteUi32BE(len) ) return false;
+ if ( ! WriteRaw((const byte_t*)str.c_str(), len) ) return false;
return true;
}
};