Visual Studio 2015 warning and test fixes
This commit is contained in:
@@ -1161,7 +1161,7 @@ class JavaWrapperGenerator(object):
|
||||
("jdoubleArray _da_retval_ = env->NewDoubleArray(%(cnt)i); " +
|
||||
"jdouble _tmp_retval_[%(cnt)i] = {%(args)s}; " +
|
||||
"env->SetDoubleArrayRegion(_da_retval_, 0, %(cnt)i, _tmp_retval_);") %
|
||||
{ "cnt" : len(fields), "args" : ", ".join(["_retval_" + f[1] for f in fields]) } )
|
||||
{ "cnt" : len(fields), "args" : ", ".join(["(jdouble)_retval_" + f[1] for f in fields]) } )
|
||||
if fi.classname and fi.ctype and not fi.static: # non-static class method except c-tor
|
||||
# adding 'self'
|
||||
jn_args.append ( ArgInfo([ "__int64", "nativeObj", "", [], "" ]) )
|
||||
@@ -1208,7 +1208,7 @@ class JavaWrapperGenerator(object):
|
||||
j_prologue.append( "double[] %s_out = new double[%i];" % (a.name, len(fields)) )
|
||||
c_epilogue.append( \
|
||||
"jdouble tmp_%(n)s[%(cnt)i] = {%(args)s}; env->SetDoubleArrayRegion(%(n)s_out, 0, %(cnt)i, tmp_%(n)s);" %
|
||||
{ "n" : a.name, "cnt" : len(fields), "args" : ", ".join([a.name + f[1] for f in fields]) } )
|
||||
{ "n" : a.name, "cnt" : len(fields), "args" : ", ".join(["(jdouble)" + a.name + f[1] for f in fields]) } )
|
||||
if a.ctype in ('bool', 'int', 'long', 'float', 'double'):
|
||||
j_epilogue.append('if(%(n)s!=null) %(n)s[0] = (%(t)s)%(n)s_out[0];' % {'n':a.name,'t':a.ctype})
|
||||
else:
|
||||
|
@@ -1070,7 +1070,7 @@ JNIEXPORT void JNICALL Java_org_opencv_core_Mat_locateROI_10
|
||||
Size wholeSize;
|
||||
Point ofs;
|
||||
me->locateROI( wholeSize, ofs );
|
||||
jdouble tmp_wholeSize[2] = {wholeSize.width, wholeSize.height}; env->SetDoubleArrayRegion(wholeSize_out, 0, 2, tmp_wholeSize); jdouble tmp_ofs[2] = {ofs.x, ofs.y}; env->SetDoubleArrayRegion(ofs_out, 0, 2, tmp_ofs);
|
||||
jdouble tmp_wholeSize[2] = {(jdouble)wholeSize.width, (jdouble)wholeSize.height}; env->SetDoubleArrayRegion(wholeSize_out, 0, 2, tmp_wholeSize); jdouble tmp_ofs[2] = {(jdouble)ofs.x, (jdouble)ofs.y}; env->SetDoubleArrayRegion(ofs_out, 0, 2, tmp_ofs);
|
||||
} catch(const std::exception &e) {
|
||||
throwJavaException(env, &e, method_name);
|
||||
} catch (...) {
|
||||
@@ -1489,7 +1489,7 @@ JNIEXPORT jdoubleArray JNICALL Java_org_opencv_core_Mat_n_1size
|
||||
Mat* me = (Mat*) self; //TODO: check for NULL
|
||||
Size _retval_ = me->size( );
|
||||
jdoubleArray _da_retval_ = env->NewDoubleArray(2);
|
||||
jdouble _tmp_retval_[2] = {_retval_.width, _retval_.height};
|
||||
jdouble _tmp_retval_[2] = {(jdouble)_retval_.width, (jdouble)_retval_.height};
|
||||
env->SetDoubleArrayRegion(_da_retval_, 0, 2, _tmp_retval_);
|
||||
return _da_retval_;
|
||||
} catch(const std::exception &e) {
|
||||
|
Reference in New Issue
Block a user