rm try..catch in HMMSegment

This commit is contained in:
wyy 2014-03-19 23:47:46 -07:00
parent ed39e558bc
commit 498bc431f4

View File

@ -136,21 +136,10 @@ namespace CppJieba
size_t now, old, stat; size_t now, old, stat;
double tmp, endE, endS; double tmp, endE, endS;
try path = new int [XYSize];
{ assert(path);
path = new int [XYSize]; weight = new double [XYSize];
weight = new double [XYSize]; assert(weight);
}
catch(const std::bad_alloc&)
{
LogError("bad_alloc");
return false;
}
if(NULL == path || NULL == weight)
{
LogError("bad_alloc");
return false;
}
//start //start
for(size_t y = 0; y < Y; y++) for(size_t y = 0; y < Y; y++)