Skip to content

Commit

Permalink
Silence CLD compiler warnings on Mac
Browse files Browse the repository at this point in the history
Remove unnecessary commented-out code
  • Loading branch information
lovell committed Jul 9, 2014
1 parent b8d8579 commit eaa2e8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
],
"sources": ["src/constants.cc", "src/cld.cc"],
"defines": [],
"cflags_cc": ["-Wall"]
"cflags_cc": ["-Wall"],
"xcode_settings": {
"OTHER_CFLAGS": ["-Wall"]
}
}
]
}
5 changes: 4 additions & 1 deletion cld/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"internal/cld_generated_score_quad_octa_0122.cc"
],
"defines": [],
"cflags_cc": ["-w"]
"cflags_cc": ["-w"],
"xcode_settings": {
"OTHER_CFLAGS": ["-w"]
}
}
]
}
3 changes: 0 additions & 3 deletions src/cld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ namespace NodeCld {
NodeCldDetected rawLanguage = rawDetected->at(i);
detected->Set(static_cast<uint32_t>(i), NanNew<v8::String>(rawLanguage.name));
}
//NanAssignPersistent(detected, NanNew<v8::Array>());
target->Set(NanNew<v8::String>("DETECTED_LANGUAGES"), detected);

// set all languages
Expand All @@ -123,7 +122,6 @@ namespace NodeCld {
NodeCldLanguage rawLanguage = rawLanguages->at(i);
languages->Set(NanNew<v8::String>(rawLanguage.name), NanNew<v8::String>(rawLanguage.code));
}
//NanAssignPersistent(languages, NanNew<v8::Object>());
target->Set(NanNew<v8::String>("LANGUAGES"), languages);

// set encodings
Expand All @@ -133,7 +131,6 @@ namespace NodeCld {
NodeCldEncoding rawEncoding = rawEncodings->at(i);
encodings->Set(static_cast<uint32_t>(i), NanNew<v8::String>(rawEncoding.name));
}
//NanAssignPersistent(encodings, NanNew<v8::Array>());
target->Set(NanNew<v8::String>("ENCODINGS"), encodings);

NODE_SET_METHOD(target, "detect", Detect);
Expand Down

0 comments on commit eaa2e8e

Please sign in to comment.