Review changes

This commit is contained in:
Hamish Milne 2020-03-28 17:08:27 +00:00
parent 86600e90d3
commit 8f164a16ce
12 changed files with 13 additions and 19 deletions

View file

@ -1,6 +1,7 @@
# CMake 3.8 required for 17 to be a valid value for CXX_STANDARD
cmake_minimum_required(VERSION 3.8)
if (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15)
# Don't override the warning flags in MSVC:
cmake_policy(SET CMP0092 NEW)
endif ()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")

View file

@ -1,7 +1,7 @@
# Definitions for all external bundled libraries
# Suppress warnings from external libraries
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/W0)
endif()

View file

@ -42,7 +42,7 @@ if (MSVC)
/Zc:externConstexpr
/Zc:inline
)
if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(
/MP
/Zc:throwingNew

View file

@ -1438,7 +1438,7 @@ void GMainWindow::OnCIAInstallFinished() {
void GMainWindow::OnMenuRecentFile() {
QAction* action = qobject_cast<QAction*>(sender());
assert(action);
ASSERT(action);
const QString filename = action->data().toString();
if (QFileInfo::exists(filename)) {

View file

@ -33,6 +33,7 @@
#include "core/hle/kernel/thread.h"
#include "core/hle/service/fs/archive.h"
#include "core/hle/service/gsp/gsp.h"
#include "core/hle/service/pm/pm_app.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
#include "core/hw/gpu.h"
@ -45,8 +46,6 @@
#include "network/network.h"
#include "video_core/video_core.h"
#include "core/hle/service/pm/pm_app.h"
namespace Core {
/*static*/ System System::s_instance;
@ -183,15 +182,11 @@ System::ResultStatus System::RunLoop(bool tight_loop) {
case Signal::Load: {
LOG_INFO(Core, "Begin load");
System::LoadState(param);
// auto stream = std::ifstream("save0.citrasave", std::fstream::binary);
// System::Load(stream, FileUtil::GetSize("save0.citrasave"));
LOG_INFO(Core, "Load completed");
} break;
case Signal::Save: {
LOG_INFO(Core, "Begin save");
System::SaveState(param);
// auto stream = std::ofstream("save0.citrasave", std::fstream::binary);
// System::Save(stream);
LOG_INFO(Core, "Save completed");
} break;
default:

View file

@ -102,7 +102,7 @@ private:
template <class Archive>
void serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<FileBackend>(*this);
ar& file_buffer; // TODO: See about a more efficient way to do this
ar& file_buffer;
}
friend class boost::serialization::access;
};

View file

@ -29,7 +29,6 @@ public:
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
private:
std::string mount_point; // TODO: Remove, unused?
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
ArchiveFactory_OtherSaveDataPermitted() = default;
@ -57,7 +56,6 @@ public:
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
private:
std::string mount_point; // TODO: Remove, unused?
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
ArchiveFactory_OtherSaveDataGeneral() = default;

View file

@ -28,7 +28,6 @@ public:
ResultVal<ArchiveFormatInfo> GetFormatInfo(const Path& path, u64 program_id) const override;
private:
std::string mount_point; // TODO: Remove this? seems unused
std::shared_ptr<ArchiveSource_SDSaveData> sd_savedata_source;
ArchiveFactory_SaveData() = default;

View file

@ -58,12 +58,12 @@ public:
private:
/// Mapping of ProgramId -> NCCHData
std::unordered_map<u64, NCCHData>
ncch_data; // TODO: Remove this, or actually set the values here
std::unordered_map<u64, NCCHData> ncch_data;
template <class Archive>
void serialize(Archive& ar, const unsigned int) {
ar& boost::serialization::base_object<ArchiveFactory>(*this);
// NOTE: ncch_data is never written to, so we don't serialize it here
}
friend class boost::serialization::access;
};

View file

@ -57,11 +57,11 @@ public:
Handler();
ConfigMemDef& GetConfigMem();
virtual u8* GetPtr() {
u8* GetPtr() override {
return static_cast<u8*>(static_cast<void*>(&config_mem));
}
virtual u32 GetSize() const {
u32 GetSize() const override {
return sizeof(config_mem);
}

View file

@ -99,12 +99,12 @@ protected:
struct SessionInfo {
SessionInfo(std::shared_ptr<ServerSession> session, std::unique_ptr<SessionDataBase> data);
SessionInfo() = default;
std::shared_ptr<ServerSession> session;
std::unique_ptr<SessionDataBase> data;
private:
SessionInfo() = default;
template <class Archive>
void serialize(Archive& ar, const unsigned int file_version) {
ar& session;

View file

@ -15,7 +15,8 @@
#include "core/hle/ipc_helpers.h"
#include "core/hle/result.h"
#include "core/hle/service/err_f.h"
#undef exception_info
#undef exception_info // We use 'exception_info' as a plain identifier, but MSVC defines this in one
// of its many headers.
SERIALIZE_EXPORT_IMPL(Service::ERR::ERR_F)