Skip to content

Commit

Permalink
fixed gcc error + gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
justadudewhohacks committed Jun 1, 2019
1 parent 3e9e4c6 commit 15aec23
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ ci/coverage-report
!data/Lenna.png
!data/people.jpeg
!data/traffic.mp4
!data/text-models
!data/text-models
!native-node-utils
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ data/dnn
.idea/
dist
.DS_Store
native-node-utils
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ coverage-report
tmpdata
ci
.dockerignore
dist
dist
native-node-utils
7 changes: 3 additions & 4 deletions cc/core/Mat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ NAN_METHOD(Mat::Norm) {

FF::TryCatch tryCatch;
if (
hasOptArgsObj && (
(hasOptArgsObj && (
FF::UintConverter::optProp(&normType, "normType", optArgs) ||
Mat::Converter::optProp(&mask, "mask", optArgs)
) || (
)) || (
FF::UintConverter::optArg(i, &normType, info) ||
Mat::Converter::optArg(i + 1, &mask, info)
)
Expand Down Expand Up @@ -460,8 +460,7 @@ NAN_METHOD(Mat::Row) {

NAN_METHOD(Mat::Release) {
// must get pointer to the original; else we are just getting a COPY and then releasing that!
cv::Mat *mat = &(Mat::unwrapSelf(info));
mat->release();
Mat::unwrapThis(info)->self.release();
}

NAN_METHOD(Mat::PushBack) {
Expand Down
4 changes: 2 additions & 2 deletions cc/core/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ NAN_METHOD(Core::Kmeans) {
cv::TermCriteria termCriteria;
int k, attempts, flags;
if ((
isPoint2 && Point2::ArrayWithCastConverter<cv::Point2f>::arg(0, &pts2d, info) ||
!isPoint2 && Point3::ArrayWithCastConverter<cv::Point3f>::arg(0, &pts3d, info)
(isPoint2 && Point2::ArrayWithCastConverter<cv::Point2f>::arg(0, &pts2d, info)) ||
(!isPoint2 && Point3::ArrayWithCastConverter<cv::Point3f>::arg(0, &pts3d, info))
) ||
FF::IntConverter::arg(1, &k, info) ||
TermCriteria::Converter::arg(2, &termCriteria, info) ||
Expand Down
2 changes: 1 addition & 1 deletion cc/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
FF::TryCatch tryCatch; \
ff_type val; \
if (ff_converter::unwrapTo(&val, value)) { \
tryCatch.throwNew(tryCatch.formatCatchedError(#name)); \
return tryCatch.throwNew(tryCatch.formatCatchedError(#name)); \
} \
Nan::ObjectWrap::Unwrap<clazz>(info.This())->prop = val; \
}
Expand Down
8 changes: 4 additions & 4 deletions cc/modules/imgproc/imgproc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ NAN_METHOD(Imgproc::Plot1DHist) {
Mat::Converter::arg(1, &plot, info) ||
Vec3::Converter::arg(2, &color, info) ||
(
FF::isArgObject(info, 3) && (
(FF::isArgObject(info, 3) && (
FF::IntConverter::optProp(&lineType, "lineType", opts) ||
FF::IntConverter::optProp(&thickness, "thickness", opts) ||
FF::IntConverter::optProp(&shift, "shift", opts)
) || (
)) || (
FF::IntConverter::optArg(3, &lineType, info) ||
FF::IntConverter::optArg(4, &thickness, info) ||
FF::IntConverter::optArg(5, &shift, info)
Expand Down Expand Up @@ -286,8 +286,8 @@ NAN_METHOD(Imgproc::FitLine) {
uint distType;
double param, reps, aeps;
if ((
isPoint2 && Point2::ArrayConverter::arg(0, &pts2d, info) ||
!isPoint2 && Point3::ArrayConverter::arg(0, &pts3d, info)
(isPoint2 && Point2::ArrayConverter::arg(0, &pts2d, info)) ||
(!isPoint2 && Point3::ArrayConverter::arg(0, &pts3d, info))
) ||
FF::UintConverter::arg(1, &distType, info) ||
FF::DoubleConverter::arg(2, &param, info) ||
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"gypfile": true,
"dependencies": {
"nan": "^2.13.2",
"native-node-utils": "^0.2.0",
"native-node-utils": "^0.2.1",
"opencv-build": "^0.1.3"
},
"optionalDependencies": {
Expand Down

0 comments on commit 15aec23

Please sign in to comment.