diff options
Diffstat (limited to 'src/tools/regrep.cpp')
-rw-r--r-- | src/tools/regrep.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp index b0cad2497ae..4d02151672b 100644 --- a/src/tools/regrep.cpp +++ b/src/tools/regrep.cpp @@ -235,7 +235,7 @@ int main(int argc, char *argv[]) /* read the template file into an astring */ std::string tempheader; - if (util::core_file::load(tempfilename.c_str(), &buffer, bufsize) == FILERR_NONE) + if (util::core_file::load(tempfilename.c_str(), &buffer, bufsize) == osd_file::error::NONE) { tempheader.assign((const char *)buffer, bufsize); osd_free(buffer); @@ -565,7 +565,7 @@ static util::core_file::ptr create_file_and_output_header(std::string &filename, util::core_file::ptr file; /* create the indexfile */ - if (util::core_file::open(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != FILERR_NONE) + if (util::core_file::open(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, file) != osd_file::error::NONE) return util::core_file::ptr(); /* print a header */ @@ -728,7 +728,7 @@ static int compare_screenshots(summary_file *curfile) if (curfile->status[listnum] == STATUS_SUCCESS) { std::string fullname; - file_error filerr; + osd_file::error filerr; util::core_file::ptr file; /* get the filename for the image */ @@ -738,7 +738,7 @@ static int compare_screenshots(summary_file *curfile) filerr = util::core_file::open(fullname.c_str(), OPEN_FLAG_READ, file); /* if that failed, look in the old location */ - if (filerr != FILERR_NONE) + if (filerr != osd_file::error::NONE) { /* get the filename for the image */ fullname = string_format("%s" PATH_SEPARATOR "snap" PATH_SEPARATOR "_%s.png", lists[listnum].dir, curfile->name); @@ -748,7 +748,7 @@ static int compare_screenshots(summary_file *curfile) } /* if that worked, load the file */ - if (filerr == FILERR_NONE) + if (filerr == osd_file::error::NONE) { png_read_bitmap(*file, bitmaps[listnum]); file.reset(); @@ -837,7 +837,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, int bitmapcount = 0; int listnum, bmnum; util::core_file::ptr file; - file_error filerr; + osd_file::error filerr; png_error pngerr; int error = -1; int starty; @@ -854,7 +854,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, /* open the source image */ filerr = util::core_file::open(tempname.c_str(), OPEN_FLAG_READ, file); - if (filerr != FILERR_NONE) + if (filerr != osd_file::error::NONE) goto error; /* load the source image */ @@ -926,7 +926,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, /* write the final PNG */ filerr = util::core_file::open(dstfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); - if (filerr != FILERR_NONE) + if (filerr != osd_file::error::NONE) goto error; pngerr = png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); file.reset(); @@ -938,7 +938,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir, error: if (error) - osd_rmfile(dstfilename.c_str()); + osd_file::remove(dstfilename); return error; } |