Skip to content

Commit

Permalink
string 使う意味がなさそうなので無くした
Browse files Browse the repository at this point in the history
  • Loading branch information
KOBA789 committed Dec 11, 2010
1 parent 9c83204 commit fdbb2a4
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions mecab.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include <v8.h>
#include <node.h>
#include <string>
#include <iostream>
#include <mecab.h>
#include "node-mecab.h"

using namespace node;
using namespace v8;
using namespace v8;
using namespace std;

Handle<Value> Tagger::New (const Arguments& args) {
Expand All @@ -14,13 +14,7 @@ Handle<Value> Tagger::New (const Arguments& args) {
Tagger *p = new Tagger();
p->Wrap(args.This());

string clopt = "";

if (args.Length() >= 1 && args[0]->IsString()) {
clopt = *String::Utf8Value(args[0]->ToString());
}

p->tagger = MeCab::createTagger(clopt.c_str());
p->tagger = MeCab::createTagger((args.Length() >= 1 && args[0]->IsString()) ? *String::Utf8Value(args[0]->ToString()) : "");

return args.This();
}
Expand Down

0 comments on commit fdbb2a4

Please sign in to comment.