Skip to content

Commit

Permalink
egt-launcher: Use std::filesystem instead of std::experimental::files…
Browse files Browse the repository at this point in the history
…ystem

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj authored and Dharma-B committed Feb 6, 2023
1 parent dc942ef commit 12dad65
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes-egt/apps/egt-launcher_1.2.bb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ DEPENDS = "libegt"
RDEPENDS:${PN} = "evtest"

SRC_URI = "git://github.com/linux4sam/egt-launcher.git;protocol=https;branch=master \
file://0001-launch.sh-Use-start-stop-daemon-to-restart-egt.patch"
file://0001-launcher-Switch-to-using-std-filesystem.patch \
file://0001-launch.sh-Use-start-stop-daemon-to-restart-egt.patch"

PV = "1.2+git${SRCPV}"
SRCREV = "529465ba53c5a0b68a0027ee149f75108557c351"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 6a9542ff552689e80aae913d12282ae21c9c5c82 Mon Sep 17 00:00:00 2001
From: Khem Raj <[email protected]>
Date: Sat, 7 Jan 2023 19:07:28 -0800
Subject: [PATCH] launcher: Switch to using std::filesystem

experimental/filesystem is promoted to std::filesystem and is must have
with c++17 and newer standard, some compilers e.g. libcxx with
llvm/clang 15+ has already dropped experimental/filesystem and expect
one to use std::filesystem

Signed-off-by: Khem Raj <[email protected]>
---
src/launcher.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/launcher.cpp b/src/launcher.cpp
index 35afa0f..c6d583d 100644
--- a/src/launcher.cpp
+++ b/src/launcher.cpp
@@ -12,7 +12,7 @@
#include <cmath>
#include <egt/detail/filesystem.h>
#include <egt/ui>
-#include <experimental/filesystem>
+#include <filesystem>
#include <fstream>
#include <iostream>
#include <memory>
@@ -121,7 +121,7 @@ private:
SwipeCallback m_callback;
};

-namespace filesys = std::experimental::filesystem;
+namespace filesys = std::filesystem;

/*
* Execute a command.
--
2.39.0

0 comments on commit 12dad65

Please sign in to comment.