core: fix Wextra Wall warnings
add missing field initializers, add a missing destructor for a base class that is being inherited later on.
This commit is contained in:
parent
696a5ad4ec
commit
f7471daba9
|
|
@ -7,8 +7,8 @@ namespace Aquamarine {
|
|||
class IBackendImplementation;
|
||||
|
||||
struct SSwapchainOptions {
|
||||
size_t length = 0;
|
||||
Hyprutils::Math::Vector2D size;
|
||||
size_t length = 0;
|
||||
Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0);
|
||||
uint32_t format = DRM_FORMAT_INVALID; // if you leave this on invalid, the swapchain will choose an appropriate format (and modifier) for you.
|
||||
bool scanout = false, cursor = false /* requires scanout = true */, multigpu = false /* if true, will force linear */;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -236,12 +236,12 @@ namespace Aquamarine {
|
|||
};
|
||||
|
||||
struct SDRMConnectorCommitData {
|
||||
Hyprutils::Memory::CSharedPointer<CDRMFB> mainFB, cursorFB;
|
||||
Hyprutils::Memory::CSharedPointer<CDRMFB> mainFB = nullptr, cursorFB = nullptr;
|
||||
bool modeset = false;
|
||||
bool blocking = false;
|
||||
uint32_t flags = 0;
|
||||
bool test = false;
|
||||
drmModeModeInfo modeInfo;
|
||||
drmModeModeInfo modeInfo{0};
|
||||
|
||||
struct {
|
||||
uint32_t gammaLut = 0;
|
||||
|
|
@ -323,6 +323,7 @@ namespace Aquamarine {
|
|||
|
||||
class IDRMImplementation {
|
||||
public:
|
||||
virtual ~IDRMImplementation() = default;
|
||||
virtual bool commit(Hyprutils::Memory::CSharedPointer<SDRMConnector> connector, SDRMConnectorCommitData& data) = 0;
|
||||
virtual bool reset() = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ namespace Aquamarine {
|
|||
class CWLBufferResource;
|
||||
|
||||
struct SDMABUFAttrs {
|
||||
bool success = false;
|
||||
Hyprutils::Math::Vector2D size;
|
||||
bool success = false;
|
||||
Hyprutils::Math::Vector2D size = Hyprutils::Math::Vector2D(0, 0);
|
||||
uint32_t format = 0; // fourcc
|
||||
uint64_t modifier = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Aquamarine {
|
|||
Hyprutils::Math::Vector2D pixelSize;
|
||||
unsigned int refreshRate = 0 /* in mHz */;
|
||||
bool preferred = false;
|
||||
std::optional<drmModeModeInfo> modeInfo; // if this is a drm mode, this will be populated.
|
||||
std::optional<drmModeModeInfo> modeInfo = std::nullopt; // if this is a drm mode, this will be populated.
|
||||
};
|
||||
|
||||
enum eOutputPresentationMode : uint32_t {
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ void Aquamarine::CBackend::updateIdleTimer() {
|
|||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
timespecAddNs(&now, ADD_NS);
|
||||
|
||||
itimerspec ts = {.it_value = now};
|
||||
itimerspec ts = {.it_interval{0, 0}, .it_value = now};
|
||||
|
||||
if (timerfd_settime(idle.fd, TFD_TIMER_ABSTIME, &ts, nullptr))
|
||||
log(AQ_LOG_ERROR, std::format("backend: failed to arm timerfd: {}", strerror(errno)));
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void Aquamarine::CHeadlessBackend::updateTimerFD() {
|
|||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
timespecAddNs(&now, lowestNs);
|
||||
|
||||
itimerspec ts = {.it_value = now};
|
||||
itimerspec ts = {.it_interval{0, 0}, .it_value = now};
|
||||
|
||||
if (timerfd_settime(timers.timerfd, TFD_TIMER_ABSTIME, &ts, nullptr))
|
||||
backend->log(AQ_LOG_ERROR, std::format("headless: failed to arm timerfd: {}", strerror(errno)));
|
||||
|
|
|
|||
|
|
@ -722,8 +722,9 @@ void Aquamarine::CSession::handleLibinputEvent(libinput_event* e) {
|
|||
auto tool = hlDevice->toolFrom(libinput_event_tablet_tool_get_tool(tte));
|
||||
|
||||
ITablet::SAxisEvent event = {
|
||||
.tool = tool,
|
||||
.timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000),
|
||||
.tool = tool,
|
||||
.timeMs = (uint32_t)(libinput_event_tablet_tool_get_time_usec(tte) / 1000),
|
||||
.absolute = Hyprutils::Math::Vector2D(0, 0),
|
||||
};
|
||||
|
||||
if (libinput_event_tablet_tool_x_has_changed(tte)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue