mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-12-24 17:01:48 +01:00
clang format fixes etc.
This commit is contained in:
parent
92640fc29c
commit
f156fdd332
@ -5,16 +5,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/icl/interval_set.hpp>
|
||||
#include <boost/serialization/split_free.hpp>
|
||||
#include "common/serialization/boost_discrete_interval.hpp"
|
||||
|
||||
namespace boost::serialization {
|
||||
|
||||
template <class Archive, class T>
|
||||
void serialize(Archive& ar, boost::icl::interval_set<T>& obj, const unsigned int file_version) {
|
||||
using IntervalSet = boost::icl::interval_set<T>;
|
||||
// This works because interval_set has exactly one member of type ImplSetT
|
||||
static_assert(std::is_standard_layout_v<IntervalSet>);
|
||||
ar&*(reinterpret_cast<typename IntervalSet::ImplSetT*>(&obj));
|
||||
void save(Archive& ar, const boost::icl::interval_set<T>& set, const unsigned int file_version) {
|
||||
ar << static_cast<u64>(set.size());
|
||||
for (auto& v : set) {
|
||||
ar << v;
|
||||
}
|
||||
}
|
||||
|
||||
template <class Archive, class T>
|
||||
void load(Archive& ar, boost::icl::interval_set<T>& set, const unsigned int file_version) {
|
||||
u64 count{};
|
||||
ar >> count;
|
||||
set.clear();
|
||||
for (u64 i = 0; i < count; i++) {
|
||||
T value{};
|
||||
ar >> value;
|
||||
set.insert(value);
|
||||
}
|
||||
}
|
||||
|
||||
template <class Archive, class T>
|
||||
void serialize(Archive& ar, boost::icl::interval_set<T>& set, const unsigned int file_version) {
|
||||
boost::serialization::split_free(ar, set, file_version);
|
||||
}
|
||||
|
||||
} // namespace boost::serialization
|
||||
|
@ -5,7 +5,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <type_traits>
|
||||
#include <boost/icl/interval_set.hpp>
|
||||
#include <boost/serialization/set.hpp>
|
||||
#include "common/common_types.h"
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/export.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include "common/common_types.h"
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <tuple>
|
||||
#include <boost/serialization/base_object.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include <boost/serialization/string.hpp>
|
||||
#include <boost/serialization/vector.hpp>
|
||||
#include "common/archives.h"
|
||||
#include "common/assert.h"
|
||||
#include "core/hle/kernel/client_port.h"
|
||||
|
@ -2,8 +2,8 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <boost/serialization/unique_ptr.hpp>
|
||||
#include <boost/serialization/shared_ptr.hpp>
|
||||
#include <boost/serialization/unique_ptr.hpp>
|
||||
#include <cryptopp/base64.h>
|
||||
#include <cryptopp/hmac.h>
|
||||
#include <cryptopp/sha.h>
|
||||
@ -1361,8 +1361,7 @@ void Module::CheckAndUpdateFile(const CecDataPathType path_type, const u32 ncch_
|
||||
case CecDataPathType::MboxData:
|
||||
case CecDataPathType::MboxIcon:
|
||||
case CecDataPathType::MboxTitle:
|
||||
default: {
|
||||
}
|
||||
default: {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ private:
|
||||
template <class Archive>
|
||||
void serialize(Archive& ar, const unsigned int) {
|
||||
ar& hid_period;
|
||||
ar& calibration_data; // This isn't writeable for now, but might be in future
|
||||
ar& calibration_data; // This isn't writeable for now, but might be in future
|
||||
if (Archive::is_loading::value) {
|
||||
LoadInputDevices(); // zl, zr, c_stick are loaded here
|
||||
}
|
||||
|
@ -24,8 +24,7 @@ static std::shared_ptr<Object> MakeObject(Kernel::KernelSystem& kernel) {
|
||||
TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel]") {
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, 0, 1, 0);
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0, 1, 0);
|
||||
auto [server, client] = kernel.CreateSessionPair();
|
||||
HLERequestContext context(kernel, std::move(server), nullptr);
|
||||
|
||||
@ -240,8 +239,7 @@ TEST_CASE("HLERequestContext::PopulateFromIncomingCommandBuffer", "[core][kernel
|
||||
TEST_CASE("HLERequestContext::WriteToOutgoingCommandBuffer", "[core][kernel]") {
|
||||
Core::Timing timing(1, 100);
|
||||
Memory::MemorySystem memory;
|
||||
Kernel::KernelSystem kernel(
|
||||
memory, timing, [] {}, 0, 1, 0);
|
||||
Kernel::KernelSystem kernel(memory, timing, [] {}, 0, 1, 0);
|
||||
auto [server, client] = kernel.CreateSessionPair();
|
||||
HLERequestContext context(kernel, std::move(server), nullptr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user