libcamera: utils: Use internal basename implementation.
Differing implementations of basename() exist, some of which may modify the content of the string passed as an argument. The implementation of basename() is trivial, thus to support different C librariese, provide our own version which accepts and returns a const char *. Update the call sites to use the new implementation. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -15,6 +15,8 @@ namespace libcamera {
|
||||
|
||||
namespace utils {
|
||||
|
||||
const char *basename(const char *path);
|
||||
|
||||
/* C++11 doesn't provide std::make_unique */
|
||||
template<typename T, typename... Args>
|
||||
std::unique_ptr<T> make_unique(Args&&... args)
|
||||
|
||||
Reference in New Issue
Block a user