mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-17 22:22:21 +02:00
ncm: more std
This commit is contained in:
parent
8f08c2eb91
commit
a669ca0091
@ -164,7 +164,7 @@ namespace ams::ncm {
|
|||||||
for (auto &data_holder : this->data_list) {
|
for (auto &data_holder : this->data_list) {
|
||||||
if (index == count++) {
|
if (index == count++) {
|
||||||
R_UNLESS(out_size >= data_holder.size, ncm::ResultBufferInsufficient());
|
R_UNLESS(out_size >= data_holder.size, ncm::ResultBufferInsufficient());
|
||||||
memcpy(out, data_holder.data.get(), data_holder.size);
|
std::memcpy(out, data_holder.data.get(), data_holder.size);
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,7 +178,7 @@ namespace ams::ncm {
|
|||||||
for (auto &data_holder : this->data_list) {
|
for (auto &data_holder : this->data_list) {
|
||||||
if (index == count++) {
|
if (index == count++) {
|
||||||
R_UNLESS(data_size == data_holder.size, ncm::ResultBufferInsufficient());
|
R_UNLESS(data_size == data_holder.size, ncm::ResultBufferInsufficient());
|
||||||
memcpy(data_holder.data.get(), data, data_size);
|
std::memcpy(data_holder.data.get(), data, data_size);
|
||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -227,7 +227,7 @@ namespace ams::ncm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Result FileInstallTaskData::Initialize(const char *path) {
|
Result FileInstallTaskData::Initialize(const char *path) {
|
||||||
strncpy(this->path, path, sizeof(this->path));
|
std::strncpy(this->path, path, sizeof(this->path));
|
||||||
this->path[sizeof(this->path) - 1] = '\x00';
|
this->path[sizeof(this->path) - 1] = '\x00';
|
||||||
return this->Read(std::addressof(this->header), sizeof(Header), 0);
|
return this->Read(std::addressof(this->header), sizeof(Header), 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user