mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #23109 from seanm:misc-warnings
* Fixed clang -Wnewline-eof warnings * Fixed all trivial clang -Wextra-semi and -Wc++98-compat-extra-semi warnings * Removed trailing semi from various macros * Fixed various -Wunused-macros warnings * Fixed some trivial -Wdocumentation warnings * Fixed some -Wdocumentation-deprecated-sync warnings * Fixed incorrect indentation * Suppressed some clang warnings in 3rd party code * Fixed QRCodeEncoder::Params documentation. --------- Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
This commit is contained in:
@@ -241,6 +241,7 @@ namespace gapi
|
||||
*
|
||||
* @brief G-API functions and classes for serialization and deserialization.
|
||||
*/
|
||||
|
||||
/** @brief Wraps deserialized output GRunArgs to GRunArgsP which can be used by GCompiled.
|
||||
*
|
||||
* Since it's impossible to get modifiable output arguments from deserialization
|
||||
@@ -254,6 +255,7 @@ namespace gapi
|
||||
* @see deserialize
|
||||
*/
|
||||
GAPI_EXPORTS cv::GRunArgsP bind(cv::GRunArgs &out_args);
|
||||
|
||||
/** @brief Wraps output GRunArgsP available during graph execution to GRunArgs which can be serialized.
|
||||
*
|
||||
* GRunArgsP is pointer-to-value, so to be serialized they need to be binded to real values
|
||||
|
||||
@@ -102,17 +102,17 @@ namespace detail
|
||||
GAPI_Assert(m_hint != nullptr);
|
||||
using U = typename std::decay<T>::type;
|
||||
return dynamic_cast<TypeHint<U>*>(m_hint.get()) != nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void GArrayU::specifyType(){
|
||||
m_hint.reset(new TypeHint<typename std::decay<T>::type>);
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void GArrayU::storeKind(){
|
||||
setKind(cv::detail::GOpaqueTraits<T>::kind);
|
||||
};
|
||||
}
|
||||
|
||||
// This class represents a typed STL vector reference.
|
||||
// Depending on origins, this reference may be either "just a" reference to
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace s11n {
|
||||
*
|
||||
* @brief G-API classes for constructed and compiled graphs.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief GComputation class represents a captured computation
|
||||
* graph. GComputation objects form boundaries for expression code
|
||||
|
||||
@@ -430,7 +430,7 @@ namespace gapi {
|
||||
|
||||
virtual ~GFunctor() = default;
|
||||
protected:
|
||||
GFunctor(const char* id) : m_id(id) { };
|
||||
GFunctor(const char* id) : m_id(id) { }
|
||||
private:
|
||||
const char* m_id;
|
||||
};
|
||||
@@ -692,7 +692,7 @@ namespace gapi {
|
||||
int unused[] = { 0, (pkg.include<KK>(), 0)... };
|
||||
cv::util::suppress_unused_warning(unused);
|
||||
return pkg;
|
||||
};
|
||||
}
|
||||
|
||||
template<typename... FF>
|
||||
GKernelPackage kernels(FF&... functors)
|
||||
@@ -701,7 +701,7 @@ namespace gapi {
|
||||
int unused[] = { 0, (pkg.include(functors), 0)... };
|
||||
cv::util::suppress_unused_warning(unused);
|
||||
return pkg;
|
||||
};
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ struct GOrigin;
|
||||
* `cv::GOpaque<T>` | T
|
||||
* cv::GFrame | cv::MediaFrame
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief GMat class represents image or tensor data in the
|
||||
* graph.
|
||||
|
||||
@@ -98,18 +98,18 @@ namespace detail
|
||||
GAPI_Assert(m_hint != nullptr);
|
||||
using U = util::decay_t<T>;
|
||||
return dynamic_cast<TypeHint<U>*>(m_hint.get()) != nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void GOpaqueU::specifyType(){
|
||||
m_hint.reset(new TypeHint<util::decay_t<T>>);
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void GOpaqueU::storeKind(){
|
||||
// FIXME: Add assert here on cv::Mat and cv::Scalar?
|
||||
setKind(cv::detail::GOpaqueTraits<T>::kind);
|
||||
};
|
||||
}
|
||||
|
||||
// This class represents a typed object reference.
|
||||
// Depending on origins, this reference may be either "just a" reference to
|
||||
|
||||
@@ -409,7 +409,7 @@ namespace streaming {
|
||||
struct GAPI_EXPORTS_W_SIMPLE queue_capacity
|
||||
{
|
||||
GAPI_WRAP
|
||||
explicit queue_capacity(size_t cap = 1) : capacity(cap) { };
|
||||
explicit queue_capacity(size_t cap = 1) : capacity(cap) { }
|
||||
GAPI_PROP_RW
|
||||
size_t capacity;
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
{ \
|
||||
struct G_DESCR_HELPER_CLASS(Class) \
|
||||
{ \
|
||||
static constexpr const char *descr() { return Descr; }; \
|
||||
static constexpr const char *descr() { return Descr; } \
|
||||
}; \
|
||||
}
|
||||
|
||||
|
||||
@@ -231,10 +231,10 @@ template<typename T> struct GObtainCtor {
|
||||
static HostCtor get() { return HostCtor{}; }
|
||||
};
|
||||
template<typename T> struct GObtainCtor<GArray<T> > {
|
||||
static HostCtor get() { return HostCtor{ConstructVec{&GArray<T>::VCtor}}; };
|
||||
static HostCtor get() { return HostCtor{ConstructVec{&GArray<T>::VCtor}}; }
|
||||
};
|
||||
template<typename T> struct GObtainCtor<GOpaque<T> > {
|
||||
static HostCtor get() { return HostCtor{ConstructOpaque{&GOpaque<T>::Ctor}}; };
|
||||
static HostCtor get() { return HostCtor{ConstructOpaque{&GOpaque<T>::Ctor}}; }
|
||||
};
|
||||
} // namespace detail
|
||||
} // namespace cv
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace detail
|
||||
//workaround for MSVC 19.0 bug
|
||||
template <typename T>
|
||||
auto make_default()->decltype(T{}) {return {};}
|
||||
}; // detail
|
||||
} // detail
|
||||
|
||||
/**
|
||||
* @brief This class is a typed wrapper over a regular GComputation.
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
, {}
|
||||
, {}
|
||||
, {} } {
|
||||
};
|
||||
}
|
||||
|
||||
/** @overload
|
||||
Use this constructor to work with pre-compiled network.
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
, {}
|
||||
, {}
|
||||
, {} } {
|
||||
};
|
||||
}
|
||||
|
||||
/** @brief Specifies sequence of network input layers names for inference.
|
||||
|
||||
@@ -547,7 +547,7 @@ public:
|
||||
detail::ParamDesc::Kind::Load, true, {}, {}, {}, 1u,
|
||||
{}, {}, {}, {}, InferMode::Async, {}, {}, {}, {} },
|
||||
m_tag(tag) {
|
||||
};
|
||||
}
|
||||
|
||||
/** @overload
|
||||
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
detail::ParamDesc::Kind::Import, true, {}, {}, {}, 1u,
|
||||
{}, {}, {}, {}, InferMode::Async, {}, {}, {}, {} },
|
||||
m_tag(tag) {
|
||||
};
|
||||
}
|
||||
|
||||
/** @see ie::Params::pluginConfig. */
|
||||
Params& pluginConfig(const IEConfig& cfg) {
|
||||
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
desc.num_out = std::tuple_size<typename Net::OutArgs>::value;
|
||||
desc.is_generic = false;
|
||||
desc.disable_mem_pattern = false;
|
||||
};
|
||||
}
|
||||
|
||||
/** @brief Specifies sequence of network input layers names for inference.
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace cv {
|
||||
* @brief Extra G-API data structures used to pass input/output data
|
||||
* to the graph for processing.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief cv::MediaFrame class represents an image/media frame
|
||||
* obtained from an external source.
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace cv
|
||||
return (m.dims == 2)
|
||||
? cv::gapi::own::Mat{m.rows, m.cols, m.type(), m.data, m.step}
|
||||
: cv::gapi::own::Mat{to_own<int>(m.size), m.type(), m.data};
|
||||
};
|
||||
}
|
||||
|
||||
namespace gapi
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ class GAPI_EXPORTS Scalar
|
||||
{
|
||||
public:
|
||||
Scalar() = default;
|
||||
explicit Scalar(double v0) { val[0] = v0; };
|
||||
explicit Scalar(double v0) { val[0] = v0; }
|
||||
Scalar(double v0, double v1, double v2 = 0, double v3 = 0)
|
||||
: val{v0, v1, v2, v3}
|
||||
{
|
||||
|
||||
@@ -337,7 +337,7 @@ namespace detail {
|
||||
template<typename V>
|
||||
IOStream& put_v(IOStream&, const V&, std::size_t) {
|
||||
GAPI_Error("variant>>: requested index is invalid");
|
||||
};
|
||||
}
|
||||
|
||||
template<typename V, typename X, typename... Xs>
|
||||
IOStream& put_v(IOStream& os, const V& v, std::size_t x) {
|
||||
|
||||
Reference in New Issue
Block a user