@@ -35,12 +35,12 @@ namespace tesseract {
35
35
// /////////////////////////////////////////////////////////////////////////////
36
36
// File::
37
37
// /////////////////////////////////////////////////////////////////////////////
38
- FILE* File::Open (const string& filename, const string& mode) {
38
+ FILE* File::Open (const std:: string& filename, const std:: string& mode) {
39
39
return fopen (filename.c_str (), mode.c_str ());
40
40
}
41
41
42
- FILE* File::OpenOrDie (const string& filename,
43
- const string& mode) {
42
+ FILE* File::OpenOrDie (const std:: string& filename,
43
+ const std:: string& mode) {
44
44
FILE* stream = fopen (filename.c_str (), mode.c_str ());
45
45
if (stream == nullptr ) {
46
46
tprintf (" Unable to open '%s' in mode '%s'\n " , filename.c_str (),
@@ -49,8 +49,8 @@ FILE* File::OpenOrDie(const string& filename,
49
49
return stream;
50
50
}
51
51
52
- void File::WriteStringToFileOrDie (const string& str,
53
- const string& filename) {
52
+ void File::WriteStringToFileOrDie (const std:: string& str,
53
+ const std:: string& filename) {
54
54
FILE* stream = fopen (filename.c_str (), " wb" );
55
55
if (stream == nullptr ) {
56
56
tprintf (" Unable to open '%s' for writing\n " , filename.c_str ());
@@ -60,7 +60,7 @@ void File::WriteStringToFileOrDie(const string& str,
60
60
ASSERT_HOST (fclose (stream) == 0 );
61
61
}
62
62
63
- bool File::Readable (const string& filename) {
63
+ bool File::Readable (const std:: string& filename) {
64
64
FILE* stream = fopen (filename.c_str (), " rb" );
65
65
if (stream == nullptr ) {
66
66
return false ;
@@ -69,7 +69,7 @@ bool File::Readable(const string& filename) {
69
69
return true ;
70
70
}
71
71
72
- bool File::ReadFileToString (const string& filename, string* out) {
72
+ bool File::ReadFileToString (const std:: string& filename, std:: string* out) {
73
73
FILE* stream = File::Open (filename.c_str (), " rb" );
74
74
if (stream == nullptr ) return false ;
75
75
InputBuffer in (stream);
@@ -78,7 +78,7 @@ bool File::ReadFileToString(const string& filename, string* out) {
78
78
return in.CloseFile ();
79
79
}
80
80
81
- string File::JoinPath (const string& prefix, const string& suffix) {
81
+ std:: string File::JoinPath (const std:: string& prefix, const std:: string& suffix) {
82
82
return (prefix.empty () || prefix[prefix.size () - 1 ] == ' /' )
83
83
? prefix + suffix
84
84
: prefix + " /" + suffix;
@@ -145,7 +145,7 @@ InputBuffer::~InputBuffer() {
145
145
}
146
146
}
147
147
148
- bool InputBuffer::Read (string* out) {
148
+ bool InputBuffer::Read (std:: string* out) {
149
149
char buf[BUFSIZ + 1 ];
150
150
int l;
151
151
while ((l = fread (buf, 1 , BUFSIZ, stream_)) > 0 ) {
@@ -183,7 +183,7 @@ OutputBuffer::~OutputBuffer() {
183
183
}
184
184
}
185
185
186
- void OutputBuffer::WriteString (const string& str) {
186
+ void OutputBuffer::WriteString (const std:: string& str) {
187
187
fputs (str.c_str (), stream_);
188
188
}
189
189
0 commit comments