mirror of
https://github.com/PixlOne/logiops.git
synced 2025-07-13 21:02:43 +08:00
Fix compiler errors and warnings on Ubuntu 20.04
Also fixes some warnings and errors seen on clang.
This commit is contained in:
parent
7147825539
commit
4c406c7363
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX /usr)
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 3b19a11e8adf5608c9facd6a4e93d8833cbc4e3f
|
||||
Subproject commit 0ad3795fcc383f51664e16c4ea1e86143207bf07
|
@ -1,8 +1,9 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(logid)
|
||||
|
||||
# C++20 is only needed for string literal template parameters
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/../CMake")
|
||||
|
||||
|
@ -100,7 +100,6 @@ Device::Device(std::string path, backend::hidpp::DeviceIndex index,
|
||||
_path(std::move(path)), _index(index),
|
||||
_config(_getConfig(manager, _hidpp20->name())),
|
||||
_profile_name(ipcgull::property_readable, ""),
|
||||
_receiver(nullptr),
|
||||
_manager(manager),
|
||||
_nickname(manager),
|
||||
_ipc_node(manager->devicesNode()->make_child(_nickname)),
|
||||
@ -116,7 +115,6 @@ Device::Device(std::shared_ptr<backend::raw::RawDevice> raw_device,
|
||||
_path(raw_device->rawPath()), _index(index),
|
||||
_config(_getConfig(manager, _hidpp20->name())),
|
||||
_profile_name(ipcgull::property_readable, ""),
|
||||
_receiver(nullptr),
|
||||
_manager(manager),
|
||||
_nickname(manager),
|
||||
_ipc_node(manager->devicesNode()->make_child(_nickname)),
|
||||
@ -132,7 +130,6 @@ Device::Device(Receiver* receiver, hidpp::DeviceIndex index,
|
||||
_path(receiver->path()), _index(index),
|
||||
_config(_getConfig(manager, _hidpp20->name())),
|
||||
_profile_name(ipcgull::property_readable, ""),
|
||||
_receiver(receiver),
|
||||
_manager(manager),
|
||||
_nickname(manager),
|
||||
_ipc_node(manager->devicesNode()->make_child(_nickname)),
|
||||
|
@ -157,7 +157,6 @@ namespace logid {
|
||||
ipcgull::property<std::string> _profile_name;
|
||||
std::map<std::string, config::Profile>::iterator _profile;
|
||||
|
||||
Receiver* _receiver;
|
||||
const std::weak_ptr<DeviceManager> _manager;
|
||||
|
||||
void _makeResetMechanism();
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ class EventHandlerLock;
|
||||
template <class T>
|
||||
struct EventHandlerList {
|
||||
typedef std::list<typename T::EventHandler> list_t;
|
||||
typedef list_t::const_iterator iterator_t;
|
||||
typedef typename list_t::const_iterator iterator_t;
|
||||
|
||||
std::list<typename T::EventHandler> list;
|
||||
mutable std::shared_mutex mutex;
|
||||
|
@ -310,7 +310,7 @@ bool Device::isStable10() {
|
||||
}
|
||||
|
||||
bool Device::isStable20() {
|
||||
static constexpr std::string ping_seq = "hello";
|
||||
static const std::string ping_seq = "hello";
|
||||
|
||||
hidpp20::Root root(this);
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace logid::backend::hidpp20 {
|
||||
struct HostInfo {
|
||||
uint8_t hostCount;
|
||||
uint8_t currentHost;
|
||||
[[maybe_unused]] bool enhancedHostSwitch;
|
||||
bool enhancedHostSwitch;
|
||||
};
|
||||
|
||||
HostInfo getHostInfo();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2022 PixlOne
|
||||
* Copyright 2019-2023 PixlOne
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,6 +22,7 @@
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <condition_variable>
|
||||
|
||||
namespace logid::backend::raw {
|
||||
|
Loading…
Reference in New Issue
Block a user