summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-03-15 15:23:11 -0500
committerVaxry <vaxry@vaxry.net>2026-03-15 15:23:21 -0500
commit902e8de7f0a8cf60ed175f63506d5644605a8e44 (patch)
treed6dc1540bcb5c54b92126b860d3b3e8c683b5a1c /src
parent94bd4123c6e8fd3162e245b0d568c9d6dfd75780 (diff)
source: c-f for new clang version
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp8
-rw-r--r--src/debug/HyprCtl.cpp14
-rw-r--r--src/layout/algorithm/tiled/master/MasterAlgorithm.cpp4
-rw-r--r--src/managers/screenshare/ScreenshareFrame.cpp6
-rw-r--r--src/protocols/SinglePixel.cpp2
-rw-r--r--src/render/OpenGL.cpp4
-rw-r--r--src/render/Renderer.cpp34
7 files changed, 36 insertions, 36 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 65a50467..b80273ee 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2544,10 +2544,10 @@ void CCompositor::openSafeModeBox() {
auto box = CAsyncDialogBox::create(I18n::i18nEngine()->localize(I18n::TXT_KEY_SAFE_MODE_TITLE), I18n::i18nEngine()->localize(I18n::TXT_KEY_SAFE_MODE_DESCRIPTION),
{
- OPT_LOAD,
- OPT_OPEN,
- OPT_OK,
- });
+ OPT_LOAD,
+ OPT_OPEN,
+ OPT_OK,
+ });
box->open()->then([OPT_LOAD, OPT_OK, OPT_OPEN, this](SP<CPromiseResult<std::string>> result) {
if (result->hasError())
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 31c22ac9..5a3d5941 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -491,11 +491,11 @@ static std::string getWorkspaceRuleData(const SWorkspaceRule& r, eHyprCtlOutputF
const std::string default_ = sc<bool>(r.isDefault) ? std::format(",\n \"default\": {}", boolToString(r.isDefault)) : "";
const std::string persistent = sc<bool>(r.isPersistent) ? std::format(",\n \"persistent\": {}", boolToString(r.isPersistent)) : "";
const std::string gapsIn = sc<bool>(r.gapsIn) ?
- std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.gapsIn.value().m_top, r.gapsIn.value().m_right, r.gapsIn.value().m_bottom, r.gapsIn.value().m_left) :
- "";
+ std::format(",\n \"gapsIn\": [{}, {}, {}, {}]", r.gapsIn.value().m_top, r.gapsIn.value().m_right, r.gapsIn.value().m_bottom, r.gapsIn.value().m_left) :
+ "";
const std::string gapsOut = sc<bool>(r.gapsOut) ?
- std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.gapsOut.value().m_top, r.gapsOut.value().m_right, r.gapsOut.value().m_bottom, r.gapsOut.value().m_left) :
- "";
+ std::format(",\n \"gapsOut\": [{}, {}, {}, {}]", r.gapsOut.value().m_top, r.gapsOut.value().m_right, r.gapsOut.value().m_bottom, r.gapsOut.value().m_left) :
+ "";
const std::string borderSize = sc<bool>(r.borderSize) ? std::format(",\n \"borderSize\": {}", r.borderSize.value()) : "";
const std::string border = sc<bool>(r.noBorder) ? std::format(",\n \"border\": {}", boolToString(!r.noBorder.value())) : "";
const std::string rounding = sc<bool>(r.noRounding) ? std::format(",\n \"rounding\": {}", boolToString(!r.noRounding.value())) : "";
@@ -518,9 +518,9 @@ static std::string getWorkspaceRuleData(const SWorkspaceRule& r, eHyprCtlOutputF
std::to_string(r.gapsIn.value().m_bottom), std::to_string(r.gapsIn.value().m_left)) :
std::format("\tgapsIn: <unset>\n");
const std::string gapsOut = sc<bool>(r.gapsOut) ?
- std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.gapsOut.value().m_top), std::to_string(r.gapsOut.value().m_right), std::to_string(r.gapsOut.value().m_bottom),
- std::to_string(r.gapsOut.value().m_left)) :
- std::format("\tgapsOut: <unset>\n");
+ std::format("\tgapsOut: {} {} {} {}\n", std::to_string(r.gapsOut.value().m_top), std::to_string(r.gapsOut.value().m_right), std::to_string(r.gapsOut.value().m_bottom),
+ std::to_string(r.gapsOut.value().m_left)) :
+ std::format("\tgapsOut: <unset>\n");
const std::string borderSize = std::format("\tborderSize: {}\n", sc<bool>(r.borderSize) ? std::to_string(r.borderSize.value()) : "<unset>");
const std::string border = std::format("\tborder: {}\n", sc<bool>(r.noBorder) ? boolToString(!r.noBorder.value()) : "<unset>");
const std::string rounding = std::format("\trounding: {}\n", sc<bool>(r.noRounding) ? boolToString(!r.noRounding.value()) : "<unset>");
diff --git a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
index 7c436b31..d27a0726 100644
--- a/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
+++ b/src/layout/algorithm/tiled/master/MasterAlgorithm.cpp
@@ -81,8 +81,8 @@ void CMasterAlgorithm::addTarget(SP<ITarget> target, bool firstMap) {
float lastSplitPercent = *PMFACT;
auto OPENINGON = isWindowTiled(Desktop::focusState()->window()) && Desktop::focusState()->window()->m_workspace == PWORKSPACE ?
- getNodeFromWindow(Desktop::focusState()->window()) :
- getMasterNode();
+ getNodeFromWindow(Desktop::focusState()->window()) :
+ getMasterNode();
const auto MOUSECOORDS = g_pInputManager->getMouseCoordsInternal();
static auto PDROPATCURSOR = CConfigValue<Hyprlang::INT>("master:drop_at_cursor");
diff --git a/src/managers/screenshare/ScreenshareFrame.cpp b/src/managers/screenshare/ScreenshareFrame.cpp
index 7b8dd428..9c5b5aa6 100644
--- a/src/managers/screenshare/ScreenshareFrame.cpp
+++ b/src/managers/screenshare/ScreenshareFrame.cpp
@@ -168,9 +168,9 @@ void CScreenshareFrame::renderMonitor() {
g_pHyprRenderer->m_renderData.noSimplify = true;
// render monitor texture
- CBox monbox = CBox{{}, PMONITOR->m_pixelSize}
- .transform(Math::wlTransformToHyprutils(Math::invertTransform(PMONITOR->m_transform)), PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y)
- .translate(-m_session->m_captureBox.pos()); // vvvv kinda ass-backwards but that's how I designed the renderer... sigh.
+ CBox monbox = CBox{{}, PMONITOR->m_pixelSize}
+ .transform(Math::wlTransformToHyprutils(Math::invertTransform(PMONITOR->m_transform)), PMONITOR->m_pixelSize.x, PMONITOR->m_pixelSize.y)
+ .translate(-m_session->m_captureBox.pos()); // vvvv kinda ass-backwards but that's how I designed the renderer... sigh.
const auto OLD = g_pHyprRenderer->m_renderData.renderModif.enabled;
g_pHyprRenderer->m_renderData.renderModif.enabled = false;
diff --git a/src/protocols/SinglePixel.cpp b/src/protocols/SinglePixel.cpp
index c4d83805..a75dce29 100644
--- a/src/protocols/SinglePixel.cpp
+++ b/src/protocols/SinglePixel.cpp
@@ -86,7 +86,7 @@ CSinglePixelBufferManagerResource::CSinglePixelBufferManagerResource(UP<CWpSingl
m_resource->setCreateU32RgbaBuffer([this](CWpSinglePixelBufferManagerV1* res, uint32_t id, uint32_t r, uint32_t g, uint32_t b, uint32_t a) {
CHyprColor color{r / sc<float>(std::numeric_limits<uint32_t>::max()), g / sc<float>(std::numeric_limits<uint32_t>::max()),
- b / sc<float>(std::numeric_limits<uint32_t>::max()), a / sc<float>(std::numeric_limits<uint32_t>::max())};
+ b / sc<float>(std::numeric_limits<uint32_t>::max()), a / sc<float>(std::numeric_limits<uint32_t>::max())};
const auto& RESOURCE = PROTO::singlePixel->m_buffers.emplace_back(makeUnique<CSinglePixelBufferResource>(id, m_resource->client(), color));
if UNLIKELY (!RESOURCE->good()) {
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 2f405fce..94d78b0b 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -1355,8 +1355,8 @@ WP<CShader> CHyprOpenGLImpl::renderToFBInternal(const STextureRenderData& data,
const bool needsSDRmod = isSDR2HDR(SOURCE_IMAGE_DESCRIPTION->value(), TARGET_IMAGE_DESCRIPTION->value());
const bool needsHDRmod = !needsSDRmod && isHDR2SDR(SOURCE_IMAGE_DESCRIPTION->value(), TARGET_IMAGE_DESCRIPTION->value());
const float maxLuminance = needsHDRmod ?
- SOURCE_IMAGE_DESCRIPTION->value().getTFMaxLuminance(-1) :
- (SOURCE_IMAGE_DESCRIPTION->value().luminances.max > 0 ? SOURCE_IMAGE_DESCRIPTION->value().luminances.max : SOURCE_IMAGE_DESCRIPTION->value().luminances.reference);
+ SOURCE_IMAGE_DESCRIPTION->value().getTFMaxLuminance(-1) :
+ (SOURCE_IMAGE_DESCRIPTION->value().luminances.max > 0 ? SOURCE_IMAGE_DESCRIPTION->value().luminances.max : SOURCE_IMAGE_DESCRIPTION->value().luminances.reference);
const auto dstMaxLuminance = TARGET_IMAGE_DESCRIPTION->value().luminances.max > 0 ? TARGET_IMAGE_DESCRIPTION->value().luminances.max : 10000;
if (maxLuminance >= dstMaxLuminance * 1.01)
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index ad0ebeac..1c9dde53 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -2220,8 +2220,8 @@ SCMSettings IHyprRenderer::getCMSettings(const NColorManagement::PImageDescripti
const bool needsSDRmod = modifySDR && isSDR2HDR(imageDescription->value(), targetImageDescription->value());
const bool needsHDRmod = !needsSDRmod && isHDR2SDR(imageDescription->value(), targetImageDescription->value());
const float maxLuminance = needsHDRmod ?
- imageDescription->value().getTFMaxLuminance(-1) :
- (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference);
+ imageDescription->value().getTFMaxLuminance(-1) :
+ (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference);
const auto dstMaxLuminance = targetImageDescription->value().luminances.max > 0 ? targetImageDescription->value().luminances.max : 10000;
auto matrix = imageDescription->getPrimaries()->convertMatrix(targetImageDescription->getPrimaries());
@@ -2556,30 +2556,30 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, S
auto colorimetry = settings.getPrimaries();
auto luminances = settings.masteringLuminances.max > 0 ? settings.masteringLuminances :
- (settings.luminances != SImageDescription::SPCLuminances{} ?
- SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} :
- SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)});
+ (settings.luminances != SImageDescription::SPCLuminances{} ?
+ SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} :
+ SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)});
Log::logger->log(Log::TRACE, "ColorManagement primaries {},{} {},{} {},{} {},{}", colorimetry.red.x, colorimetry.red.y, colorimetry.green.x, colorimetry.green.y,
- colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
+ colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
Log::logger->log(Log::TRACE, "ColorManagement min {}, max {}, cll {}, fall {}", luminances.min, luminances.max, settings.maxCLL, settings.maxFALL);
return hdr_output_metadata{
- .metadata_type = 0,
- .hdmi_metadata_type1 =
+ .metadata_type = 0,
+ .hdmi_metadata_type1 =
hdr_metadata_infoframe{
- .eotf = eotf,
- .metadata_type = 0,
- .display_primaries =
- {
+ .eotf = eotf,
+ .metadata_type = 0,
+ .display_primaries =
+ {
{.x = to16Bit(colorimetry.red.x), .y = to16Bit(colorimetry.red.y)},
{.x = to16Bit(colorimetry.green.x), .y = to16Bit(colorimetry.green.y)},
{.x = to16Bit(colorimetry.blue.x), .y = to16Bit(colorimetry.blue.y)},
},
- .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)},
- .max_display_mastering_luminance = toNits(luminances.max),
- .min_display_mastering_luminance = toNits(luminances.min * 10000),
- .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()),
- .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()),
+ .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)},
+ .max_display_mastering_luminance = toNits(luminances.max),
+ .min_display_mastering_luminance = toNits(luminances.min * 10000),
+ .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()),
+ .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()),
},
};
}