partition_data_manager: Take VirtualFile by const reference in constructor

Given the VirtualFile instance isn't stored into the class as a data
member, or written to, this can just be turned into a const reference,
as the constructor doesn't need to make a copy of it.
pull/8/head
Lioncash 6 years ago
parent e96d69c328
commit d257a3b56c

@ -301,7 +301,7 @@ FileSys::VirtualFile FindFileInDirWithNames(const FileSys::VirtualDir& dir,
return nullptr;
}
PartitionDataManager::PartitionDataManager(FileSys::VirtualDir sysdata_dir)
PartitionDataManager::PartitionDataManager(const FileSys::VirtualDir& sysdata_dir)
: boot0(FindFileInDirWithNames(sysdata_dir, "BOOT0")),
fuses(FindFileInDirWithNames(sysdata_dir, "fuse")),
kfuses(FindFileInDirWithNames(sysdata_dir, "kfuse")),

@ -23,7 +23,7 @@ class PartitionDataManager {
public:
static const u8 MAX_KEYBLOB_SOURCE_HASH;
explicit PartitionDataManager(FileSys::VirtualDir sysdata_dir);
explicit PartitionDataManager(const FileSys::VirtualDir& sysdata_dir);
~PartitionDataManager();
// BOOT0

Loading…
Cancel
Save