Skip to content
Snippets Groups Projects
Commit 0ac4f850 authored by Marco Biasini's avatar Marco Biasini
Browse files

fix unit tests and silence warnings when compiling with clang

now all unit tests pass
parent c6cbe911
No related branches found
No related tags found
No related merge requests found
Showing
with 65 additions and 41 deletions
......@@ -20,11 +20,9 @@
#include "alg_mirror.hh"
namespace ost { namespace img {
namespace ost { namespace img { namespace image_state {
#ifndef NO_EXPL_INST
template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::MirrorFnc>;
#endif
}} // ns
}}} // ns
......@@ -20,11 +20,9 @@
#include "alg_shift.hh"
namespace ost { namespace img {
namespace ost { namespace img { namespace image_state {
#ifndef NO_EXPL_INST
template class TEMPLATE_DEF_EXPORT ImageStateModOPAlgorithm<alg::ShiftFnc>;
#endif
}} // ns
}}} // ns
......@@ -20,11 +20,9 @@
#include "alg_transform.hh"
namespace ost { namespace img {
namespace ost { namespace img { namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateModOPAlgorithm<alg::TransformFnc>;
}} // ns
}}} // ns
......@@ -55,5 +55,7 @@ ImageStateBasePtr AutoCorrelateFnc::VisitState(const ImageStateImpl<V,D>& isi) c
}
}
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::AutoCorrelateFnc>;
}} //
}}} //
......@@ -43,10 +43,8 @@ private:
typedef ImageStateConstModOPAlgorithm<AutoCorrelateFnc> AutoCorrelate;
}
}}} // ns
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::AutoCorrelateFnc>)
}} // ns
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<ost::img::alg::AutoCorrelateFnc>)
#endif
......@@ -91,7 +91,10 @@ ImageStateBasePtr ExplicitConvoluteFnc::VisitState(const ImageStateImpl<V,D>& is
}
}
template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::ExplicitConvoluteFnc>;
}} // ns
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::ExplicitConvoluteFnc>;
}}} // ns
......@@ -55,10 +55,8 @@ typedef ImageStateConstModOPAlgorithm<DiscreteShrinkFnc> DiscreteShrink;
}
OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::DiscreteShrinkFnc>)
}} // ns
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<ost::img::alg::DiscreteShrinkFnc>)
#endif
......@@ -50,9 +50,11 @@ typedef image_state::ImageStateConstModOPAlgorithm<FFTFnc> FFT;
}
OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::FFTFnc>)
}} // ns
}} // ns
OST_IMG_ALG_EXPLICIT_INST_DECL(class, ImageStateConstModOPAlgorithm<ost::img::alg::FFTFnc>)
#endif
......@@ -107,5 +107,8 @@ void GaussianFilterBase::calcBVals( Real q )
} // ns
namespace image_state {
template class ImageStateModIPAlgorithm<alg::GaussianFilterBase>;
}}
}}}
......@@ -139,7 +139,7 @@ typedef ImageStateModIPAlgorithm<GaussianFilterBase> GaussianFilter;
OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateModIPAlgorithm<alg::GaussianFilterBase>)
OST_IMG_ALG_EXPLICIT_INST_DECL(class, ImageStateModIPAlgorithm<alg::GaussianFilterBase>)
......
......@@ -80,5 +80,9 @@ void HistogramBase::VisitFunction(const Function& fnc)
}
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateNonModAlgorithm<alg::HistogramBase>;
}} // namespaces
}}} // namespaces
......@@ -74,7 +74,7 @@ typedef ImageStateNonModAlgorithm<HistogramBase> Histogram;
}
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::HistogramBase>)
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<ost::img::alg::HistogramBase>)
}} // namespaces
......
......@@ -59,6 +59,8 @@ void MaskImageBase::VisitState(ImageStateImpl<T,D>& is) const
}
template class TEMPLATE_DEF_EXPORT ImageStateConstModIPAlgorithm<alg::MaskImageBase>;
namespace image_state {
}} // namespaces
template class TEMPLATE_DEF_EXPORT ImageStateConstModIPAlgorithm<alg::MaskImageBase>;
}}} // namespaces
......@@ -54,10 +54,10 @@ typedef ImageStateConstModIPAlgorithm<MaskImageBase> MaskImage;
}
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::MaskImageBase>)
}} // namespaces
}} // namespaces
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<ost::img::alg::MaskImageBase>)
#endif /*MASK_IMAGE_HH_*/
......@@ -26,10 +26,10 @@
# if defined(_MSC_VER)
# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t)
# else
# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template TEMPLATE_EXPORT c t;
# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template TEMPLATE_EXPORT c ost::img::image_state::t;
# endif
#else
# define DLLEXPORT_IMG_ALG DLLIMPORT
# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT t;
# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT ost::img::image_state::t;
#endif
#endif
......@@ -104,6 +104,10 @@ ImageStateBasePtr PowerSpectrumFnc::VisitState(const ImageStateImpl<V,D>& isi) c
}
}
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::PowerSpectrumFnc>;
}} //
}}} //
......@@ -80,5 +80,10 @@ void SmoothMaskImageBase::VisitState(ImageStateImpl<T,D>& is)
}
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateModIPAlgorithm<alg::SmoothMaskImageBase>;
}} // namespaces
}}} // namespaces
......@@ -55,8 +55,10 @@ typedef ImageStateModIPAlgorithm<SmoothMaskImageBase> SmoothMaskImage;
}
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::SmoothMaskImageBase>)
}} // namespaces
}} // namespaces
OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<ost::img::alg::SmoothMaskImageBase>)
#endif /*SMOOTH_MASK_IMAGE_HH_*/
......@@ -162,5 +162,8 @@ std::ostream& operator<<(std::ostream& o, const Stat& s)
}
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateNonModAlgorithm<alg::StatBase>;
}} // ns
}}} // ns
......@@ -98,5 +98,9 @@ std::ostream& operator<<(std::ostream& o, const StatMinMax& s)
}
template class TEMPLATE_DEF_EXPORT ImageStateNonModAlgorithm<alg::StatMinMaxBase>;
}} // ns
namespace image_state {
template class TEMPLATE_DEF_EXPORT ImageStateNonModAlgorithm<alg::StatMinMaxBase>;
}}} // ns
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment