made retina code compile with VS2005/VS2008

This commit is contained in:
Vadim Pisarevsky
2011-08-12 11:28:17 +00:00
parent 6b162ea211
commit 50d70cf9c6
10 changed files with 48 additions and 35 deletions

View File

@@ -58,4 +58,14 @@
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
namespace cv
{
// special function to get pointer to constant valarray elements, since
// simple &arr[0] does not compile on VS2005/VS2008.
template<typename T> inline const T* get_data(const std::valarray<T>& arr)
{ return &((std::valarray<T>&)arr)[0]; }
}
#endif