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_NO_EXCEPT
Compile-time length of a null-terminated C string.
constexpr bool path_has_parent_segment(const char *p) FL_NO_EXCEPT
Compile-time check: returns true if the string contains a ".." segment.
139#define FL_ASSET(LITERAL_PATH) \
140 ([]() -> ::fl::asset_ref { \
141 FL_STATIC_ASSERT( \
142 !::fl::asset_detail::path_has_parent_segment(LITERAL_PATH), \
143 "fl::asset path must not contain '..' segments"); \
144 return ::fl::asset_ref( \
145 (LITERAL_PATH), ::fl::asset_detail::clen(LITERAL_PATH)); \
146 }())