mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Initial commit
This commit is contained in:
20
arm9/source/romBrowser/FileInfo.cpp
Normal file
20
arm9/source/romBrowser/FileInfo.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "common.h"
|
||||
#include <string.h>
|
||||
#include "core/StringUtil.h"
|
||||
#include "FileInfo.h"
|
||||
|
||||
FileInfo::FileInfo(const FileInfo& fileInfo)
|
||||
: _type(fileInfo._type), _fastFileRef(fileInfo._fastFileRef)
|
||||
{
|
||||
u32 bufferLength = strlen(fileInfo.GetFileName()) + 1;
|
||||
_name = std::make_unique_for_overwrite<TCHAR[]>(bufferLength);
|
||||
StringUtil::Copy(_name.get(), fileInfo.GetFileName(), bufferLength);
|
||||
}
|
||||
|
||||
FileInfo::FileInfo(const TCHAR* fileName, const FileType* type, const FastFileRef& fastFileRef)
|
||||
: _type(type), _fastFileRef(fastFileRef)
|
||||
{
|
||||
u32 bufferLength = strlen(fileName) + 1;
|
||||
_name = std::make_unique_for_overwrite<TCHAR[]>(bufferLength);
|
||||
StringUtil::Copy(_name.get(), fileName, bufferLength);
|
||||
}
|
||||
Reference in New Issue
Block a user