C++17ification.

C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
This commit is contained in:
gibbed
2020-03-02 09:37:11 -06:00
committed by Rick Gibbed
parent 114cea6fb7
commit 5bf0b34445
220 changed files with 4944 additions and 4294 deletions

View File

@@ -2,7 +2,7 @@
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Copyright 2020 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
@@ -42,8 +42,8 @@
DEFINE_bool(debug, DEFAULT_DEBUG_FLAG,
"Allow debugging and retain debug information.", "General");
DEFINE_string(trace_function_data_path, "", "File to write trace data to.",
"CPU");
DEFINE_path(trace_function_data_path, "", "File to write trace data to.",
"CPU");
DEFINE_bool(break_on_start, false, "Break into the debugger on startup.",
"CPU");
@@ -140,7 +140,7 @@ bool Processor::Setup(std::unique_ptr<backend::Backend> backend) {
}
// Open the trace data path, if requested.
functions_trace_path_ = xe::to_wstring(cvars::trace_function_data_path);
functions_trace_path_ = cvars::trace_function_data_path;
if (!functions_trace_path_.empty()) {
functions_trace_file_ = ChunkedMappedMemoryWriter::Open(
functions_trace_path_, 32 * 1024 * 1024, true);
@@ -167,7 +167,7 @@ bool Processor::AddModule(std::unique_ptr<Module> module) {
return true;
}
Module* Processor::GetModule(const char* name) {
Module* Processor::GetModule(const std::string_view name) {
auto global_lock = global_critical_region_.Acquire();
for (const auto& module : modules_) {
if (module->name() == name) {
@@ -186,7 +186,7 @@ std::vector<Module*> Processor::GetModules() {
return clone;
}
Function* Processor::DefineBuiltin(const std::string& name,
Function* Processor::DefineBuiltin(const std::string_view name,
BuiltinFunction::Handler handler, void* arg0,
void* arg1) {
uint32_t address = next_builtin_address_;