FL_STATIC_ASSERT( \
"fl::asset path must not contain '..' segments"); \
return ::fl::asset_ref( \
}())
Opaque handle to a sketch-local asset.
constexpr fl::size clen(const char *s, fl::size n=0) FL_NOEXCEPT
Compile-time length of a null-terminated C string.
constexpr bool path_has_parent_segment(const char *p) FL_NOEXCEPT
Compile-time check: returns true if the string contains a ".." segment.
137#define FL_ASSET(LITERAL_PATH) \
138 ([]() -> ::fl::asset_ref { \
139 FL_STATIC_ASSERT( \
140 !::fl::asset_detail::path_has_parent_segment(LITERAL_PATH), \
141 "fl::asset path must not contain '..' segments"); \
142 return ::fl::asset_ref( \
143 (LITERAL_PATH), ::fl::asset_detail::clen(LITERAL_PATH)); \
144 }())