libcamera: utils: Don't use C++17 nested namespaces
Nesting namespace names in a single namespace declaration is a C++17 feature. As libcamera depends on C++11 only, nest two separate namespace declarations instead. Reported-by: Shik Chen <shik@google.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -11,7 +11,9 @@
|
||||
|
||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
|
||||
|
||||
namespace libcamera::utils {
|
||||
namespace libcamera {
|
||||
|
||||
namespace utils {
|
||||
|
||||
/* C++11 doesn't provide std::make_unique */
|
||||
template<typename T, typename... Args>
|
||||
@@ -20,6 +22,8 @@ std::unique_ptr<T> make_unique(Args&&... args)
|
||||
return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
} /* namespace libcamera::utils */
|
||||
} /* namespace utils */
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
#endif /* __LIBCAMERA_UTILS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user