From 614d5376df42934546e9e358d2efc3a2b932826e Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Sat, 21 Sep 2024 11:46:46 -0700 Subject: [PATCH] chore: remove some warnings on msvc #108 --- ecsact/cli/detail/glob.hh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ecsact/cli/detail/glob.hh b/ecsact/cli/detail/glob.hh index 06eef43..d25be22 100644 --- a/ecsact/cli/detail/glob.hh +++ b/ecsact/cli/detail/glob.hh @@ -21,15 +21,19 @@ auto path_matches_glob( const std::filesystem::path& glob_pattern ) -> bool; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wcomment" +#ifdef __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcomment" +#endif /** * Gets the path before the first glob pattern. For example if your glob pattern * is `a/b/*` the returning path would be `a/b`. Or if you have multiple glob * patterns such as `a/b/*.txt/c/*.d` the returning path would still be `a/b`. */ auto path_before_glob(std::filesystem::path) -> std::filesystem::path; -#pragma clang diagnostic pop +#ifdef __clang__ +# pragma clang diagnostic pop +#endif // not really a glob feature, but useful path util auto path_strip_prefix(