aboutsummaryrefslogtreecommitdiffstats
path: root/src/buf_es.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-07-23 15:44:04 +0000
committerlloyd <[email protected]>2007-07-23 15:44:04 +0000
commite2f1f734277146d817ab284dea21e4013cb5b937 (patch)
tree21ad6ee775e36aa7fb24a504077200c22b1f15b8 /src/buf_es.cpp
parent211c4929ae92106794984d872a0cae1a873baa29 (diff)
Avoid C-style casts (as detected by GCC's -Wold-style-cast) and instead use
static_cast or reinterpret_cast, as needed.
Diffstat (limited to 'src/buf_es.cpp')
-rw-r--r--src/buf_es.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buf_es.cpp b/src/buf_es.cpp
index 857d7688b..409a98297 100644
--- a/src/buf_es.cpp
+++ b/src/buf_es.cpp
@@ -52,7 +52,7 @@ void Buffered_EntropySource::do_fast_poll()
*************************************************/
void Buffered_EntropySource::add_bytes(const void* entropy_ptr, u32bit length)
{
- const byte* bytes = (const byte*)entropy_ptr;
+ const byte* bytes = static_cast<const byte*>(entropy_ptr);
while(length)
{
u32bit copied = std::min(length, buffer.size() - write_pos);
@@ -68,7 +68,7 @@ void Buffered_EntropySource::add_bytes(const void* entropy_ptr, u32bit length)
*************************************************/
void Buffered_EntropySource::add_bytes(u64bit entropy)
{
- add_bytes((const void*)&entropy, 8);
+ add_bytes(&entropy, 8);
}
/*************************************************