Permalink
Browse files

fix a few argument checking odd syntax

  • Loading branch information...
Dane Springmeyer
Dane Springmeyer committed Dec 13, 2012
1 parent 1a6a400 commit 5506642b505b4a12bb025ca9dd94f8acd4c0fa8b
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/mapnik_fonts.hpp
  2. +1 −1 src/mapnik_image.cpp
  3. +1 −1 src/mapnik_image_view.cpp
View
@@ -28,7 +28,7 @@ static inline Handle<Value> register_fonts(const Arguments& args)
try
{
- if (!args.Length() >= 1 || !args[0]->IsString())
+ if (args.Length() == 0 || !args[0]->IsString())
return ThrowException(Exception::TypeError(
String::New("first argument must be a path to a directory of fonts")));
View
@@ -571,7 +571,7 @@ Handle<Value> Image::save(const Arguments& args)
{
HandleScope scope;
- if (!args.Length() >= 1 || !args[0]->IsString()){
+ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError(
String::New("filename required")));
}
@@ -466,7 +466,7 @@ Handle<Value> ImageView::save(const Arguments& args)
{
HandleScope scope;
- if (!args.Length() >= 1 || !args[0]->IsString()){
+ if (args.Length() == 0 || !args[0]->IsString()){
return ThrowException(Exception::TypeError(
String::New("filename required")));
}

0 comments on commit 5506642

Please sign in to comment.