1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

fix some warnings

This commit is contained in:
Megamouse 2023-02-21 23:28:43 +01:00
parent c20aa2ad5f
commit 38d612e5ba
3 changed files with 5 additions and 15 deletions

View File

@ -1,9 +1,7 @@
#include "stdafx.h"
#include "overlay_home_menu.h"
#include "Emu/RSX/RSXThread.h"
#include <sstream>
#include <iomanip>
#include "Utilities/date_time.h"
namespace rsx
{
@ -11,11 +9,7 @@ namespace rsx
{
std::string get_time_string()
{
std::ostringstream ost;
const std::time_t dateTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
const std::tm tm = *std::localtime(&dateTime);
ost << std::put_time(&tm, "%Y/%m/%d %H:%M:%S");
return ost.str();
return date_time::fmt_time("%Y/%m/%d %H:%M:%S", time(nullptr));
}
home_menu_dialog::home_menu_dialog()

View File

@ -3,8 +3,6 @@
#include <iostream>
#include <chrono>
#include <sstream>
#include <iomanip>
#include <QApplication>
#include <QCommandLineParser>
@ -28,6 +26,7 @@
#include "headless_application.h"
#include "Utilities/sema.h"
#include "Utilities/date_time.h"
#include "Crypto/decrypt_binaries.h"
#ifdef _WIN32
#include "module_verifier.hpp"
@ -410,11 +409,8 @@ void log_q_debug(QtMsgType type, const QMessageLogContext& context, const QStrin
template <>
void fmt_class_string<std::chrono::sys_time<typename std::chrono::system_clock::duration>>::format(std::string& out, u64 arg)
{
std::ostringstream ss;
const std::time_t dateTime = std::chrono::system_clock::to_time_t(get_object(arg));
const std::tm tm = *std::localtime(&dateTime);
ss << std::put_time(&tm, "%Y-%m-%eT%H:%M:%S");
out += ss.str();
out += date_time::fmt_time("%Y-%m-%eT%H:%M:%S", dateTime);
}
void run_platform_sanity_checks()

View File

@ -442,7 +442,7 @@ namespace utils
memcpy(&data[m_size], buffer, buffer_size);
}
const u32 timestamp_ms = stream->time_base.den ? (1000 * av.frame->best_effort_timestamp * stream->time_base.num) / stream->time_base.den : 0;
const s64 timestamp_ms = stream->time_base.den ? (1000 * av.frame->best_effort_timestamp * stream->time_base.num) / stream->time_base.den : 0;
timestamps_ms.push_back({m_size, timestamp_ms});
m_size += buffer_size;
}