WII_IPC_HLE_Device_usb: const correctness for function parameters

The data passed in isn't modified in these functions

Also normalizes variables with prefixed underscores in the modified
functions (and normalizes outliers to our current coding style), as
single-underscore followed by any lowercased/uppercased character is
reserved for use in the global namespace (it's a common misconception this
is assumed to only be the case for underscores followed by a capital
character, but this is only the case in C, not C++).
This commit is contained in:
Lioncash committed 2015-12-05 16:14:37 -05:00
1 parent 7134d727bf
commit f6c247d10e
4 files changed
+330 -336

No files matched your search

@@ -145,17 +145,17 @@ void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
});
}
void PrintDataBuffer(LogTypes::LOG_TYPE type, u8* _pData, size_t _Size, const std::string& _title)
void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const std::string& title)
{
GENERIC_LOG(type, LogTypes::LDEBUG, "%s", _title.c_str());
for (u32 j = 0; j < _Size;)
GENERIC_LOG(type, LogTypes::LDEBUG, "%s", title.c_str());
for (u32 j = 0; j < size;)
{
std::string hex_line = "";
for (int i = 0; i < 16; i++)
{
hex_line += StringFromFormat("%02x ", _pData[j++]);
hex_line += StringFromFormat("%02x ", data[j++]);
if (j >= _Size)
if (j >= size)
break;
}
GENERIC_LOG(type, LogTypes::LDEBUG, " Data: %s", hex_line.c_str());
@@ -22,7 +22,7 @@ struct CallstackEntry
bool GetCallstack(std::vector<CallstackEntry> &output);
void PrintCallstack();
void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level);
void PrintDataBuffer(LogTypes::LOG_TYPE _Log, u8* _pData, size_t _Size, const std::string& _title);
void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const std::string& title);
void AddAutoBreakpoints();