summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-03-02 08:59:22 +0000
committerChris Wilson <chris+github@qwirx.com>2014-03-02 08:59:22 +0000
commitb88db70703097ae8e5894e6dd5af2c5b672799a9 (patch)
treee8d0b65cf37e65902023469e27ae160dbe7e5c7c
parent9b3ddb5de87f9fdacdef6dfd719b7e76c9cb4f15 (diff)
Use static_cast instead of C-style casts, for C++ style and safety.
-rwxr-xr-xlib/server/makeprotocol.pl.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/server/makeprotocol.pl.in b/lib/server/makeprotocol.pl.in
index 9e954e6a..78ef57a1 100755
--- a/lib/server/makeprotocol.pl.in
+++ b/lib/server/makeprotocol.pl.in
@@ -938,8 +938,8 @@ std::auto_ptr<$message_base_class> $server_or_client_class\::Receive()
try
{
apReply = std::auto_ptr<$message_base_class>(
- ($message_base_class *)
- $custom_protocol_subclass\::ReceiveInternal().release());
+ static_cast<$message_base_class *>
+ ($custom_protocol_subclass\::ReceiveInternal().release()));
}
catch(ConnectionException &e)
{
@@ -1111,7 +1111,8 @@ __E
CheckReply("$cmd", rQuery, *preply, $reply_id);
// Correct response, if no exception thrown by CheckReply
- return std::auto_ptr<$reply_class>(($reply_class *)preply.release());
+ return std::auto_ptr<$reply_class>(
+ static_cast<$reply_class *>(apReply.release()));
}
__E
}