Some local temp string as std::string
.
This commit is contained in:
@ -28,6 +28,8 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#define LEN 1000
|
||||
|
||||
/*
|
||||
@ -50,11 +52,8 @@ Hyphenator::Hyphenator (const char *patFile, const char *excFile, int pack)
|
||||
{
|
||||
trie = NULL; // As long we are not sure whether a pattern file can be read.
|
||||
|
||||
int bufLen = strlen (patFile) + 5 + 1;
|
||||
char *buf = new char[bufLen];
|
||||
snprintf(buf, bufLen, "%s.trie", patFile);
|
||||
FILE *trieF = fopen (buf, "r");
|
||||
delete[] buf;
|
||||
using namespace std::literals::string_literals;
|
||||
FILE *trieF = fopen ( (patFile + ".trie"s).c_str(), "r");
|
||||
|
||||
if (trieF) {
|
||||
trie = new Trie ();
|
||||
|
Reference in New Issue
Block a user