Add a dedicated library for working with JSON (#2047)

This commit is contained in:
Lukas Senionis
2024-01-21 00:05:35 +02:00
committed by GitHub
parent bed58cf8b9
commit bf1b9a20ec
16 changed files with 154 additions and 92 deletions

View File

@@ -3,19 +3,6 @@
// sunshine utility header for generic smart pointers
#include "src/utility.h"
// sunshine boost::log severity levels
#include "src/main.h"
// standard library headers
#include <filesystem>
#include <iostream>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <type_traits>
#include <vector>
// winapi headers
// disable clang-format header reordering
// clang-format off
@@ -23,21 +10,12 @@
#include <aclapi.h>
// clang-format on
// nvapi headers
// disable clang-format header reordering
// clang-format off
#include <nvapi.h>
#include <NvApiDriverSettings.h>
// clang-format on
// boost headers
#include <boost/json.hpp>
namespace nvprefs {
struct safe_handle: public util::safe_ptr_v2<void, BOOL, CloseHandle> {
using util::safe_ptr_v2<void, BOOL, CloseHandle>::safe_ptr_v2;
explicit operator bool() const {
explicit
operator bool() const {
auto handle = get();
return handle != NULL && handle != INVALID_HANDLE_VALUE;
}