fix warning
This commit is contained in:
8
src/3rdParty/libkdtree/kdtree++/kdtree.hpp
vendored
8
src/3rdParty/libkdtree/kdtree++/kdtree.hpp
vendored
@@ -473,10 +473,10 @@ namespace KDTree
|
||||
}
|
||||
|
||||
const_iterator
|
||||
find_within_range_iterative(const_reference __a, const_reference __b)
|
||||
{
|
||||
return const_iterator(begin());
|
||||
}
|
||||
find_within_range_iterative(const_reference /*__a*/, const_reference /*__b*/)
|
||||
{
|
||||
return const_iterator(begin());
|
||||
}
|
||||
|
||||
template <typename SearchVal, typename _OutputIterator>
|
||||
_OutputIterator
|
||||
|
||||
@@ -633,7 +633,7 @@ void QuantityPy::setFormat(Py::Tuple arg)
|
||||
throw Py::ValueError("Invalid format character");
|
||||
|
||||
bool ok;
|
||||
fmt.format = Base::QuantityFormat::toFormat(fmtstr.front(), &ok);
|
||||
fmt.format = Base::QuantityFormat::toFormat(fmtstr[0], &ok);
|
||||
if (!ok)
|
||||
throw Py::ValueError("Invalid format character");
|
||||
|
||||
|
||||
@@ -153,7 +153,6 @@ std::string Base::Tools::escapedUnicodeFromUtf8(const char *s)
|
||||
return escapedstr;
|
||||
|
||||
PyObject* escaped = PyUnicode_AsUnicodeEscapeString(unicode);
|
||||
|
||||
if (escaped) {
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
escapedstr = std::string(PyBytes_AsString(escaped));
|
||||
@@ -162,8 +161,8 @@ std::string Base::Tools::escapedUnicodeFromUtf8(const char *s)
|
||||
#endif
|
||||
Py_DECREF(escaped);
|
||||
}
|
||||
Py_DECREF(unicode);
|
||||
|
||||
Py_DECREF(unicode);
|
||||
return escapedstr;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ PyObject* UnitsApi::sSchemaTranslate(PyObject * /*self*/, PyObject *args,PyObjec
|
||||
quant = *static_cast<Base::QuantityPy*>(q)->getQuantityPtr();
|
||||
|
||||
std::unique_ptr<UnitsSchema> schema(createSchema(static_cast<UnitSystem>(index)));
|
||||
if (!schema) {
|
||||
if (!schema.get()) {
|
||||
PyErr_SetString(PyExc_ValueError, "invalid schema value");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user