summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/concepts.h4
-rw-r--r--src/common/dynamic_library.cpp2
-rw-r--r--src/common/file_util.cpp4
-rw-r--r--src/common/time_zone.cpp14
-rw-r--r--src/video_core/renderer_vulkan/wrapper.cpp2
5 files changed, 15 insertions, 11 deletions
diff --git a/src/common/concepts.h b/src/common/concepts.h
index 54252e778..5bef3ad67 100644
--- a/src/common/concepts.h
+++ b/src/common/concepts.h
@@ -4,10 +4,10 @@
#pragma once
-namespace Common {
-
#include <type_traits>
+namespace Common {
+
// Check if type is like an STL container
template <typename T>
concept IsSTLContainer = requires(T t) {
diff --git a/src/common/dynamic_library.cpp b/src/common/dynamic_library.cpp
index 7ab54e9e4..7f0a10521 100644
--- a/src/common/dynamic_library.cpp
+++ b/src/common/dynamic_library.cpp
@@ -21,7 +21,7 @@ namespace Common {
DynamicLibrary::DynamicLibrary() = default;
DynamicLibrary::DynamicLibrary(const char* filename) {
- Open(filename);
+ void(Open(filename));
}
DynamicLibrary::DynamicLibrary(DynamicLibrary&& rhs) noexcept
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index c869e7b82..16c3713e0 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -909,10 +909,10 @@ std::string SanitizePath(std::string_view path_, DirectorySeparator directory_se
return std::string(RemoveTrailingSlash(path));
}
-IOFile::IOFile() {}
+IOFile::IOFile() = default;
IOFile::IOFile(const std::string& filename, const char openmode[], int flags) {
- Open(filename, openmode, flags);
+ void(Open(filename, openmode, flags));
}
IOFile::~IOFile() {
diff --git a/src/common/time_zone.cpp b/src/common/time_zone.cpp
index 7aa1b59ea..ce239eb63 100644
--- a/src/common/time_zone.cpp
+++ b/src/common/time_zone.cpp
@@ -3,9 +3,8 @@
// Refer to the license.txt file included.
#include <chrono>
-#include <ctime>
-
-#include <fmt/chrono.h>
+#include <iomanip>
+#include <sstream>
#include "common/logging/log.h"
#include "common/time_zone.h"
@@ -17,8 +16,13 @@ std::string GetDefaultTimeZone() {
}
static std::string GetOsTimeZoneOffset() {
- // Get the current timezone offset, e.g. "-400", as a string
- return fmt::format("%z", fmt::localtime(std::time(nullptr)));
+ const std::time_t t{std::time(nullptr)};
+ const std::tm tm{*std::localtime(&t)};
+
+ std::stringstream ss;
+ ss << std::put_time(&tm, "%z"); // Get the current timezone offset, e.g. "-400", as a string
+
+ return ss.str();
}
static int ConvertOsTimeZoneOffsetToInt(const std::string& timezone) {
diff --git a/src/video_core/renderer_vulkan/wrapper.cpp b/src/video_core/renderer_vulkan/wrapper.cpp
index c43d60adf..013865aa4 100644
--- a/src/video_core/renderer_vulkan/wrapper.cpp
+++ b/src/video_core/renderer_vulkan/wrapper.cpp
@@ -786,7 +786,7 @@ std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProp
VK_SUCCESS) {
return std::nullopt;
}
- return properties;
+ return std::move(properties);
}
std::optional<std::vector<VkLayerProperties>> EnumerateInstanceLayerProperties(