diff options
| author | 2021-09-10 09:39:10 -0700 | |
|---|---|---|
| committer | 2021-09-10 09:39:10 -0700 | |
| commit | fedb40f712d34bb2b6904487ce88dd124e26c7f5 (patch) | |
| tree | 3a539aa7f386b3c11ec76bdb266ca03a08039cfe /src/tools/pngcmp.cpp | |
| parent | e505ac97bd2de9100d02d37fc0270504bf60b531 (diff) | |
| parent | a99d2f3295c21e6ae97cbffce8cf025860bfa4d6 (diff) | |
Merge branch 'master' into time-experiments2
Diffstat (limited to 'src/tools/pngcmp.cpp')
| -rw-r--r-- | src/tools/pngcmp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/pngcmp.cpp b/src/tools/pngcmp.cpp index 43fc9324a06..624023425af 100644 --- a/src/tools/pngcmp.cpp +++ b/src/tools/pngcmp.cpp @@ -73,15 +73,15 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img bitmap_argb32 finalbitmap; int width, height, maxwidth; util::core_file::ptr file; - osd_file::error filerr; + std::error_condition filerr; util::png_error pngerr; int error = 100; /* open the source image */ filerr = util::core_file::open(imgfile1, OPEN_FLAG_READ, file); - if (filerr != osd_file::error::NONE) + if (filerr) { - printf("Could not open %s (%d)\n", imgfile1.c_str(), int(filerr)); + printf("Could not open %s (%s)\n", imgfile1.c_str(), filerr.message().c_str()); goto error; } @@ -96,9 +96,9 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img /* open the source image */ filerr = util::core_file::open(imgfile2, OPEN_FLAG_READ, file); - if (filerr != osd_file::error::NONE) + if (filerr) { - printf("Could not open %s (%d)\n", imgfile2.c_str(), int(filerr)); + printf("Could not open %s (%s)\n", imgfile2.c_str(), filerr.message().c_str()); goto error; } @@ -171,9 +171,9 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img /* write the final PNG */ filerr = util::core_file::open(outfilename, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, file); - if (filerr != osd_file::error::NONE) + if (filerr) { - printf("Could not open %s (%d)\n", outfilename.c_str(), int(filerr)); + printf("Could not open %s (%s)\n", outfilename.c_str(), filerr.message().c_str()); goto error; } pngerr = util::png_write_bitmap(*file, nullptr, finalbitmap, 0, nullptr); |
