/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static const FeedbackStyleInfo DEFAULT_FEEDBACK_STYLE_INFO;
FeedbackStyle::FeedbackStyle()
-: mConnections( this )
{
mFeedback = Dali::FeedbackPlayer::Get();
if( signalFeedbackInfo.mHasHapticFeedbackInfo || signalFeedbackInfo.mHasSoundFeedbackInfo )
{
- AddSignalInfo( themeInfo, signalFeedbackInfo );
+ AddSignalInfo( themeInfo, std::move( signalFeedbackInfo ) );
}
}
}
} // LoadFromString()
-void FeedbackStyle::AddSignalInfo( FeedbackStyleInfo& styleInfo, SignalFeedbackInfo signalInfo )
+void FeedbackStyle::AddSignalInfo( FeedbackStyleInfo& styleInfo, SignalFeedbackInfo&& signalInfo )
{
bool updated = false;
- std::vector<SignalFeedbackInfo>::iterator iter;
+ SignalFeedbackInfoContainer::iterator iter;
// If info exists for the signal then update it, else add new
for( iter = styleInfo.mSignalFeedbackInfoList.begin(); iter != styleInfo.mSignalFeedbackInfoList.end(); ++iter )
if( !updated )
{
- styleInfo.mSignalFeedbackInfoList.push_back( signalInfo );
+ styleInfo.mSignalFeedbackInfoList.emplace_back( std::move( signalInfo ) );
}
}