Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

common/file_util: Make IOFile's WriteString take a std::string_view

Lioncashe71ba6388aca
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 38cc7f059c..cd5a0c5fce 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -257,8 +257,8 @@ public:
return WriteArray(&object, 1);
}
- std::size_t WriteString(const std::string& str) {
- return WriteArray(str.c_str(), str.length());
+ std::size_t WriteString(std::string_view str) {
+ return WriteArray(str.data(), str.length());
}
bool IsOpen() const {