mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2026-07-08 17:56:48 +00:00
common/strutils: Remove old defines of snprintf and vsnprinft.
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define snprintf sprintf_s
|
||||
#define vsnprintf vsprintf_s
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
||||
|
||||
@@ -110,8 +110,9 @@ MemoryWindow::draw()
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
|
||||
uint32_t targetAddress = static_cast<uint32_t>(editAddress);
|
||||
snprintf(addressInput, 32, "%08X", targetAddress);
|
||||
snprintf(dataInput, 32, "%02X", mem::read<unsigned char>(targetAddress));
|
||||
std::snprintf(addressInput, 32, "%08X", targetAddress);
|
||||
std::snprintf(dataInput, 32, "%02X",
|
||||
mem::read<unsigned char>(targetAddress));
|
||||
|
||||
mLastEditAddress = editAddress;
|
||||
newlyFocused = true;
|
||||
|
||||
@@ -118,9 +118,9 @@ SAVEGetSharedDataTitlePath(uint64_t titleID,
|
||||
|
||||
auto titleLo = static_cast<uint32_t>(titleID & 0xffffffff);
|
||||
auto titleHi = static_cast<uint32_t>(titleID >> 32);
|
||||
auto result = snprintf(buffer.get(), bufferSize,
|
||||
"/vol/%s/sys/title/%08x/%08x/content/%s",
|
||||
storage, titleHi, titleLo, dir.get());
|
||||
auto result = std::snprintf(buffer.get(), bufferSize,
|
||||
"/vol/%s/sys/title/%08x/%08x/content/%s",
|
||||
storage, titleHi, titleLo, dir.get());
|
||||
|
||||
if (result < 0 || static_cast<uint32_t>(result) >= bufferSize) {
|
||||
return SaveStatus::FatalError;
|
||||
@@ -154,9 +154,9 @@ SAVEGetSharedSaveDataPath(uint64_t titleID,
|
||||
|
||||
auto titleLo = static_cast<uint32_t>(titleID & 0xffffffff);
|
||||
auto titleHi = static_cast<uint32_t>(titleID >> 32);
|
||||
auto result = snprintf(buffer.get(), bufferSize,
|
||||
"/vol/%s/usr/save/%08x/%08x/content/%s",
|
||||
storage, titleHi, titleLo, dir.get());
|
||||
auto result = std::snprintf(buffer.get(), bufferSize,
|
||||
"/vol/%s/usr/save/%08x/%08x/content/%s",
|
||||
storage, titleHi, titleLo, dir.get());
|
||||
|
||||
if (result < 0 || static_cast<uint32_t>(result) >= bufferSize) {
|
||||
return SaveStatus::FatalError;
|
||||
|
||||
Reference in New Issue
Block a user