Skip to content

Commit

Permalink
Use static 'AppImage::getFormat' in 'appimage_get_type'
Browse files Browse the repository at this point in the history
  • Loading branch information
azubieta committed May 9, 2019
1 parent f4cd2b4 commit 7e083d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libappimage/libappimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ extern "C" {
int appimage_get_type(const char* path, bool) {
typedef std::underlying_type<AppImageFormat>::type utype;
CATCH_ALL(
AppImage appImage(path);
return static_cast<utype>(appImage.getFormat());
const auto format = AppImage::getFormat(path);
return static_cast<utype>(format);
);

return static_cast<utype>(AppImageFormat::INVALID);
}

Expand Down

0 comments on commit 7e083d7

Please sign in to comment.