summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2012-08-28 13:16:59 +0000
committerGordon Sim <gsim@apache.org>2012-08-28 13:16:59 +0000
commit93cfe7961b60929aae0718355291885d2e23ecfc (patch)
tree66d49528b04a2864ac12f01c632f85472c8e6ccf /cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
parent89a01d88c398751c228c0f57eb9520dc3f02abc4 (diff)
downloadqpid-python-93cfe7961b60929aae0718355291885d2e23ecfc.tar.gz
NO-JIRA: Remove const qualifier from encode buffer (can't encode into if it is const, and impls const cast it anyway)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1378125 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp')
-rw-r--r--cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp b/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
index 29b91f3e7a..a4d291ebab 100644
--- a/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
+++ b/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
@@ -68,7 +68,7 @@ size_t CyrusSecurityLayer::decode(const char* input, size_t size)
return size;
}
-size_t CyrusSecurityLayer::encode(const char* buffer, size_t size)
+size_t CyrusSecurityLayer::encode(char* buffer, size_t size)
{
size_t processed = 0;//records how many bytes have been written to buffer
do {
@@ -92,12 +92,12 @@ size_t CyrusSecurityLayer::encode(const char* buffer, size_t size)
//can't fit all encrypted data in the buffer we've
//been given, copy in what we can and hold on to the
//rest until the next call
- ::memcpy(const_cast<char*>(buffer + processed), encrypted, remaining);
+ ::memcpy(buffer + processed, encrypted, remaining);
processed += remaining;
encrypted += remaining;
encryptedSize -= remaining;
} else {
- ::memcpy(const_cast<char*>(buffer + processed), encrypted, encryptedSize);
+ ::memcpy(buffer + processed, encrypted, encryptedSize);
processed += encryptedSize;
encrypted = 0;
encryptedSize = 0;