mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 05:19:48 +01:00
core: Add libc++ compatibility (#73)
src/renderer/AsyncResourceGatherer.cpp:98:22: error: no viable overloaded '+=' 98 | progress += 1.0 / (preloads + 1.0); | ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~ src/renderer/widgets/IWidget.cpp:41:44: error: no member named 'current_zone' in namespace 'std::chrono' 41 | const auto current_zone = std::chrono::current_zone(); | ~~~~~~~~~~~~~^
This commit is contained in:
parent
4c68780143
commit
8969351cba
2 changed files with 14 additions and 0 deletions
|
@ -95,7 +95,11 @@ void CAsyncResourceGatherer::gather() {
|
|||
progress = 0;
|
||||
for (auto& c : CWIDGETS) {
|
||||
if (c.type == "background") {
|
||||
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 180100
|
||||
progress = progress + 1.0 / (preloads + 1.0);
|
||||
#else
|
||||
progress += 1.0 / (preloads + 1.0);
|
||||
#endif
|
||||
|
||||
std::string path = std::any_cast<Hyprlang::STRING>(c.values.at("path"));
|
||||
|
||||
|
|
|
@ -4,6 +4,16 @@
|
|||
#include <chrono>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 190100
|
||||
#pragma comment(lib, "date-tz")
|
||||
#include <date/tz.h>
|
||||
namespace std {
|
||||
namespace chrono {
|
||||
using date::current_zone;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Vector2D IWidget::posFromHVAlign(const Vector2D& viewport, const Vector2D& size, const Vector2D& offset, const std::string& halign, const std::string& valign) {
|
||||
Vector2D pos = offset;
|
||||
if (halign == "center")
|
||||
|
|
Loading…
Reference in a new issue