Some local temp string as std::string.

This commit is contained in:
2025-08-03 20:43:24 -04:00
parent 09e94a651d
commit 336f5a73f1

View File

@ -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 ();