ice
ice copied to clipboard
Const correctness of dispatch code
C++ 11 generated code for a dispatch looks like
/// \cond INTERNAL
bool
PollingChat::PollingChatSession::_iceD_getUpdates(::IceInternal::Incoming& inS, const ::Ice::Current& current)
{
_iceCheckMode(::Ice::OperationMode::Normal, current.mode);
inS.readEmptyParams();
ChatRoomEventSeq ret = this->getUpdates(current);
auto ostr = inS.startWriteParams();
ostr->writeAll(ret);
ostr->writePendingValues();
inS.endWriteParams();
return true;
}
clang-tidy rerpots
cpp11/Chat/server/generated/PollingChat.cpp:155:5: warning: variable 'ret' of type 'PollingChat::ChatRoomEventSeq' (aka 'vector< ::std::shared_ptr<ChatRoomEvent>>') can be declared 'const' [misc-const-correctness]
ChatRoomEventSeq ret = this->getUpdates(current);
^
The clang-tidy diagnostics does not match your generated code snippet.
updated the generated code snippet