Skip to content

Commit

Permalink
renaming for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
m0dB authored and m0dB committed Dec 17, 2024
1 parent bd5c225 commit 62f2a22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/util/roundtopixel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <cmath>

inline auto makeRoundToPixel(float devicePixelRatio) {
inline auto createFunctionRoundToPixel(float devicePixelRatio) {
return [devicePixelRatio](float pos) {
return std::round(pos * devicePixelRatio) / devicePixelRatio;
};
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/allshader/digitsrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void allshader::DigitsRenderer::updateTexture(

const float y = maxTextHeight + space - 0.5f;

auto roundToPixel = makeRoundToPixel(devicePixelRatio);
auto roundToPixel = createFunctionRoundToPixel(devicePixelRatio);

float totalTextWidth{};
std::array<float, NUM_CHARS> xs;
Expand Down
2 changes: 1 addition & 1 deletion src/waveform/renderers/allshader/waveformrendermark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void allshader::WaveformRenderMark::paintGL() {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

auto roundToPixel = makeRoundToPixel(devicePixelRatio);
auto roundToPixel = createFunctionRoundToPixel(devicePixelRatio);

for (const auto& pMark : std::as_const(m_marks)) {
pMark->setBreadth(slipActive ? m_waveformRenderer->getBreadth() / 2
Expand Down

0 comments on commit 62f2a22

Please sign in to comment.