Explorar o código

profile_manager: Remove unnecessary memcpy in GetProfileBaseAndData()

Given the source and destination types are the same std::array type, we
can simply use regular assignment to perform the same behavior.
Lioncash %!s(int64=8) %!d(string=hai) anos
pai
achega
9d8f19d7bf
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/hle/service/acc/profile_manager.cpp

+ 1 - 1
src/core/hle/service/acc/profile_manager.cpp

@@ -207,7 +207,7 @@ UUID ProfileManager::GetLastOpenedUser() const {
 bool ProfileManager::GetProfileBaseAndData(boost::optional<size_t> index, ProfileBase& profile,
                                            ProfileData& data) const {
     if (GetProfileBase(index, profile)) {
-        std::memcpy(data.data(), profiles[index.get()].data.data(), MAX_DATA);
+        data = profiles[index.get()].data;
         return true;
     }
     return false;