ADL for AlmostEqual* and use math:: instead of base:: (#9634)

* ADL for AlmostEqual* and use math:: instead of base::

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-07 20:49:00 +02:00
committed by Konstantin Pastbin
parent 82133c5743
commit 30718e106e
175 changed files with 542 additions and 559 deletions

View File

@@ -7,6 +7,7 @@
#include "coding/reader.hpp"
#include "base/math.hpp"
#include "base/logging.hpp"
#include "base/macros.hpp"
@@ -180,7 +181,7 @@ public:
return {true, base::TaskLoop::kNoId};
}
void ExecuteTasks()
void ExecuteTasks()
{
std::lock_guard<std::mutex> lock(m_mutex);
for (auto & task : m_tasks)
@@ -276,7 +277,7 @@ int main(int argc, char * argv[])
.m_visualScale = visualScale,
.m_surfaceWidth = fbWidth,
.m_surfaceHeight = fbHeight,
.m_renderInjectionHandler = [&](ref_ptr<dp::GraphicsContext> context,
.m_renderInjectionHandler = [&](ref_ptr<dp::GraphicsContext> context,
ref_ptr<dp::TextureManager> textureManager,
ref_ptr<gpu::ProgramManager> programManager,
bool shutdown)
@@ -359,9 +360,9 @@ int main(int argc, char * argv[])
framework.OnSize(fbWidth, fbHeight);
}
};
glfwSetWindowContentScaleCallback(window, [](GLFWwindow *, float xscale, float yscale)
{
handlers.onContentScale(xscale, yscale);
glfwSetWindowContentScaleCallback(window, [](GLFWwindow *, float xscale, float yscale)
{
handlers.onContentScale(xscale, yscale);
});
// Location handler
@@ -384,7 +385,7 @@ int main(int argc, char * argv[])
.m_bearing = bearingEnabled ? bearing : -1.0f});
if (bearingEnabled)
{
framework.OnCompassUpdate(location::CompassInfo{.m_bearing = base::DegToRad(bearing)});
framework.OnCompassUpdate(location::CompassInfo{.m_bearing = math::DegToRad(bearing)});
}
}
};
@@ -517,9 +518,9 @@ int main(int argc, char * argv[])
GetTouchEvent(framework, x, y, touchMods, df::TouchEvent::TOUCH_MOVE));
}
};
glfwSetCursorPosCallback(window, [](GLFWwindow *, double x, double y)
{
handlers.onMouseMove(x, y);
glfwSetCursorPosCallback(window, [](GLFWwindow *, double x, double y)
{
handlers.onMouseMove(x, y);
});
// Handle scroll.