From 8c5ded4e6fbdcea922c8ef117b998fc7fe8d3689 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 18 Feb 2013 02:42:14 -0500 Subject: [PATCH] Nonce::{cc_str,data}: Make const Found by cppcheck. Signed-off-by: Anders Kaseorg --- src/crypto/crypto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto/crypto.h b/src/crypto/crypto.h index 81a5aea..c2eb996 100644 --- a/src/crypto/crypto.h +++ b/src/crypto/crypto.h @@ -97,8 +97,8 @@ namespace Crypto { Nonce( uint64_t val ); Nonce( char *s_bytes, size_t len ); - string cc_str( void ) { return string( (char *)( bytes + 4 ), 8 ); } - char *data( void ) { return bytes; } + string cc_str( void ) const { return string( bytes + 4, 8 ); } + const char *data( void ) const { return bytes; } uint64_t val( void ); };