bundle may contain large data, we need to re-use this bundle for memory
optimization.
Change-Id: I91bd32d3c3943e4e76deca606cb4ca1f4f2276b6
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
#include <algorithm>
#include <string>
+#include <utility>
#include <vector>
#include "theme/utils/logging.h"
namespace ttm {
namespace loader {
-ThemeInfo::ThemeInfo(const tizen_base::Bundle& bundle) {
- bundle_ = tizen_base::Bundle(bundle);
-}
+ThemeInfo::ThemeInfo(tizen_base::Bundle bundle) : bundle_(std::move(bundle)) { }
bool ThemeInfo::IsValid() const noexcept {
return !bundle_.IsEmpty();
class ThemeInfo {
public:
ThemeInfo() { }
- explicit ThemeInfo(const tizen_base::Bundle& bundle);
+ explicit ThemeInfo(tizen_base::Bundle bundle);
bool IsValid() const noexcept;
std::string GetId() const;
}
loader::ThemeInfo ThemeInfoBuilder::Build() {
- return loader::ThemeInfo(bundle_);
+ return loader::ThemeInfo(std::move(bundle_));
}
void ThemeInfoBuilder::GenerateFileKey(const std::string& root) {
return b;
}
- loader::ThemeInfo theme(args);
+ loader::ThemeInfo theme(std::move(args));
switch (cmd) {
case dbus::Command::ADD: {
result = InstallTheme(theme);