diff options
author | jacobkeeler <jacob.keeler@livioradio.com> | 2018-01-17 14:08:12 -0500 |
---|---|---|
committer | jacobkeeler <jacob.keeler@livioradio.com> | 2018-01-17 16:35:41 -0500 |
commit | 2dab63338c700b9f92f50dfdd3b9490f04057503 (patch) | |
tree | 498034cb327aff82f3b832bfeef43879483a4d7c | |
parent | a8c3e2ac28d758b30a2b933918635ef33f2d4cd3 (diff) | |
download | sdl_core-feature/deprecated_method_macro.tar.gz |
Address review commentsfeature/deprecated_method_macro
Remove C style casts
Add comments for pragma directives
Remove redundant DEPRECATED macro usages
8 files changed, 14 insertions, 11 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 896713f8bc..9da69b8279 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -1166,7 +1166,7 @@ void ApplicationManagerImpl::ReplaceHMIByMobileAppId( } } -DEPRECATED bool ApplicationManagerImpl::StartNaviService( +bool ApplicationManagerImpl::StartNaviService( uint32_t app_id, protocol_handler::ServiceType service_type) { using namespace protocol_handler; LOG4CXX_AUTO_TRACE(logger_); @@ -1337,9 +1337,10 @@ void ApplicationManagerImpl::StopNaviService( app->StopStreaming(service_type); } +// Suppress warning for deprecated method used within another deprecated method #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -DEPRECATED bool ApplicationManagerImpl::OnServiceStartedCallback( +bool ApplicationManagerImpl::OnServiceStartedCallback( const connection_handler::DeviceHandle& device_handle, const int32_t& session_key, const protocol_handler::ServiceType& type) { diff --git a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc index 9a802914c4..a05d41c098 100644 --- a/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc +++ b/src/components/application_manager/src/commands/mobile/perform_audio_pass_thru_request.cc @@ -224,7 +224,7 @@ PerformAudioPassThruRequest::PrepareResponseParameters() { return response_params_; } -DEPRECATED bool PerformAudioPassThruRequest::PrepareResponseParameters( +bool PerformAudioPassThruRequest::PrepareResponseParameters( mobile_apis::Result::eType& result_code, std::string& info) { LOG4CXX_AUTO_TRACE(logger_); NOTREACHED(); diff --git a/src/components/application_manager/src/message.cc b/src/components/application_manager/src/message.cc index 2a91289441..7bc686aef1 100644 --- a/src/components/application_manager/src/message.cc +++ b/src/components/application_manager/src/message.cc @@ -89,7 +89,7 @@ Message& Message::operator=(const Message& message) { set_data_size(message.data_size_); set_payload_size(message.payload_size_); if (message.binary_data_) { - set_binary_data((const BinaryData*)message.binary_data_); + set_binary_data(static_cast<const BinaryData*>(message.binary_data_)); } set_json_message(message.json_message_); set_protocol_version(message.protocol_version()); @@ -194,7 +194,7 @@ void Message::set_message_type(MessageType type) { type_ = type; } -DEPRECATED void Message::set_binary_data(BinaryData* data) { +void Message::set_binary_data(BinaryData* data) { if (NULL == data) { NOTREACHED(); return; diff --git a/src/components/config_profile/src/profile.cc b/src/components/config_profile/src/profile.cc index 5642d6f494..6389375bb8 100644 --- a/src/components/config_profile/src/profile.cc +++ b/src/components/config_profile/src/profile.cc @@ -451,7 +451,7 @@ const std::string& Profile::app_resource_folder() const { return app_resource_folder_; } -DEPRECATED bool Profile::enable_protocol_4() const { +bool Profile::enable_protocol_4() const { return max_supported_protocol_version_ >= 4; } diff --git a/src/components/connection_handler/src/connection_handler_impl.cc b/src/components/connection_handler/src/connection_handler_impl.cc index 44044d77b1..254bb0194f 100644 --- a/src/components/connection_handler/src/connection_handler_impl.cc +++ b/src/components/connection_handler/src/connection_handler_impl.cc @@ -284,7 +284,7 @@ bool AllowProtection(const ConnectionHandlerSettings& settings, } #endif // ENABLE_SECURITY -DEPRECATED uint32_t ConnectionHandlerImpl::OnSessionStartedCallback( +uint32_t ConnectionHandlerImpl::OnSessionStartedCallback( const transport_manager::ConnectionUID connection_handle, const uint8_t session_id, const protocol_handler::ServiceType& service_type, @@ -541,7 +541,7 @@ void ConnectionHandlerImpl::OnMalformedMessageCallback( CloseConnection(connection_handle); } -DEPRECATED uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( +uint32_t ConnectionHandlerImpl::OnSessionEndedCallback( const transport_manager::ConnectionUID connection_handle, const uint8_t session_id, const uint32_t& hashCode, diff --git a/src/components/protocol_handler/src/protocol_handler_impl.cc b/src/components/protocol_handler/src/protocol_handler_impl.cc index 921f27873f..0c4b72b535 100644 --- a/src/components/protocol_handler/src/protocol_handler_impl.cc +++ b/src/components/protocol_handler/src/protocol_handler_impl.cc @@ -1307,9 +1307,10 @@ class StartSessionHandler : public security_manager::SecurityManagerListener { } // namespace #endif // ENABLE_SECURITY +// Suppress warning for deprecated method used within another deprecated method #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -DEPRECATED RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( +RESULT_CODE ProtocolHandlerImpl::HandleControlMessageStartSession( const ProtocolPacket& packet) { LOG4CXX_AUTO_TRACE(logger_); LOG4CXX_DEBUG( diff --git a/src/components/remote_control/test/src/rc_module_test.cc b/src/components/remote_control/test/src/rc_module_test.cc index b10baa7461..e7c3576f31 100644 --- a/src/components/remote_control/test/src/rc_module_test.cc +++ b/src/components/remote_control/test/src/rc_module_test.cc @@ -169,7 +169,8 @@ TEST_F(RCModuleTest, ProcessMessagePass) { application_manager::BinaryData* data = &buf; data->push_back(1); - message_->set_binary_data((const application_manager::BinaryData*)data); + message_->set_binary_data( + static_cast<const application_manager::BinaryData*>(data)); Json::Value json_value = MessageHelper::StringToValue(json); Json::Value module_type = diff --git a/src/components/telemetry_monitor/src/telemetry_monitor.cc b/src/components/telemetry_monitor/src/telemetry_monitor.cc index 947119edc1..53a5a2dc70 100644 --- a/src/components/telemetry_monitor/src/telemetry_monitor.cc +++ b/src/components/telemetry_monitor/src/telemetry_monitor.cc @@ -64,7 +64,7 @@ void TelemetryMonitor::Start() { thread_ = threads::CreateThread("TelemetryMonitor", streamer_.get()); } -DEPRECATED void TelemetryMonitor::set_streamer(Streamer* streamer) {} +void TelemetryMonitor::set_streamer(Streamer* streamer) {} void TelemetryMonitor::set_streamer(utils::SharedPtr<Streamer> streamer) { LOG4CXX_AUTO_TRACE(logger_); |