Explorar o código

content_archive: Simpify assignment of bktr_base_romfs in the constructor

std::move doesn't actually dereference the data, so it doesn't matter
whether or not the type is null.
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
871350ae35
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      src/core/file_sys/content_archive.cpp

+ 1 - 2
src/core/file_sys/content_archive.cpp

@@ -103,8 +103,7 @@ static bool IsValidNCA(const NCAHeader& header) {
 }
 }
 
 
 NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset)
 NCA::NCA(VirtualFile file_, VirtualFile bktr_base_romfs_, u64 bktr_base_ivfc_offset)
-    : file(std::move(file_)),
-      bktr_base_romfs(bktr_base_romfs_ ? std::move(bktr_base_romfs_) : nullptr) {
+    : file(std::move(file_)), bktr_base_romfs(std::move(bktr_base_romfs_)) {
     if (file == nullptr) {
     if (file == nullptr) {
         status = Loader::ResultStatus::ErrorNullFile;
         status = Loader::ResultStatus::ErrorNullFile;
         return;
         return;