Drop cv:: prefix from cv::String used inside the cv namespace
This commit is contained in:
@@ -115,7 +115,7 @@ typedef std::vector<Rect> vector_Rect;
|
||||
typedef std::vector<KeyPoint> vector_KeyPoint;
|
||||
typedef std::vector<Mat> vector_Mat;
|
||||
typedef std::vector<DMatch> vector_DMatch;
|
||||
typedef std::vector<cv::String> vector_String;
|
||||
typedef std::vector<String> vector_String;
|
||||
typedef std::vector<std::vector<Point> > vector_vector_Point;
|
||||
typedef std::vector<std::vector<Point2f> > vector_vector_Point2f;
|
||||
typedef std::vector<std::vector<Point3f> > vector_vector_Point3f;
|
||||
@@ -548,12 +548,12 @@ static PyObject* pyopencv_from(int64 value)
|
||||
return PyLong_FromLongLong(value);
|
||||
}
|
||||
|
||||
static PyObject* pyopencv_from(const cv::String& value)
|
||||
static PyObject* pyopencv_from(const String& value)
|
||||
{
|
||||
return PyString_FromString(value.empty() ? "" : value.c_str());
|
||||
}
|
||||
|
||||
static bool pyopencv_to(PyObject* obj, cv::String& value, const char* name = "<unknown>")
|
||||
static bool pyopencv_to(PyObject* obj, String& value, const char* name = "<unknown>")
|
||||
{
|
||||
(void)name;
|
||||
if(!obj || obj == Py_None)
|
||||
@@ -561,7 +561,7 @@ static bool pyopencv_to(PyObject* obj, cv::String& value, const char* name = "<u
|
||||
char* str = PyString_AsString(obj);
|
||||
if(!str)
|
||||
return false;
|
||||
value = cv::String(str);
|
||||
value = String(str);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -904,14 +904,14 @@ template<> struct pyopencvVecConverter<DMatch>
|
||||
}
|
||||
};
|
||||
|
||||
template<> struct pyopencvVecConverter<cv::String>
|
||||
template<> struct pyopencvVecConverter<String>
|
||||
{
|
||||
static bool to(PyObject* obj, std::vector<cv::String>& value, const ArgInfo info)
|
||||
static bool to(PyObject* obj, std::vector<String>& value, const ArgInfo info)
|
||||
{
|
||||
return pyopencv_to_generic_vec(obj, value, info);
|
||||
}
|
||||
|
||||
static PyObject* from(const std::vector<cv::String>& value)
|
||||
static PyObject* from(const std::vector<String>& value)
|
||||
{
|
||||
return pyopencv_from_generic_vec(value);
|
||||
}
|
||||
@@ -992,7 +992,7 @@ static bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name
|
||||
PyObject* item = PyList_GET_ITEM(values, i);
|
||||
if( !PyString_Check(key) )
|
||||
break;
|
||||
cv::String k = PyString_AsString(key);
|
||||
String k = PyString_AsString(key);
|
||||
if( PyString_Check(item) )
|
||||
{
|
||||
const char* value = PyString_AsString(item);
|
||||
|
Reference in New Issue
Block a user