Another local string.
This commit is contained in:
@ -181,7 +181,8 @@ void Hyphenator::insertException (char *s)
|
|||||||
if((unsigned char)s[i] == 0xc2 && (unsigned char)s[i + 1] == 0xad)
|
if((unsigned char)s[i] == 0xc2 && (unsigned char)s[i + 1] == 0xad)
|
||||||
breaks->put (new Integer (i - 2 * breaks->size()));
|
breaks->put (new Integer (i - 2 * breaks->size()));
|
||||||
|
|
||||||
char *noHyphens = new char[len - 2 * breaks->size() + 1];
|
std::string noHyphens;
|
||||||
|
noHyphens.resize( len - 2 * breaks->size() + 1 );
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for (int i = 0; i < len; ) {
|
for (int i = 0; i < len; ) {
|
||||||
if(i < len - 1 &&
|
if(i < len - 1 &&
|
||||||
@ -192,8 +193,7 @@ void Hyphenator::insertException (char *s)
|
|||||||
}
|
}
|
||||||
noHyphens[j] = 0;
|
noHyphens[j] = 0;
|
||||||
|
|
||||||
exceptions->put (new String (noHyphens), breaks);
|
exceptions->put (new String (noHyphens.c_str()), breaks);
|
||||||
delete[] noHyphens;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user