Skip to content

Commit

Permalink
prevent variable redefinition for android
Browse files Browse the repository at this point in the history
  • Loading branch information
barnasm1 committed Jan 15, 2025
1 parent 701cd96 commit 97f2a96
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/common/util/include/openvino/util/file_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,15 @@ inline ov::util::Path cut_android_path(const ov::util::Path& file_name) {
* @param[in] path The file name
* @return file size
*/
inline int64_t file_size(const ov::util::Path& file_name) {
inline int64_t file_size(const ov::util::Path& path) {
#if defined(__ANDROID__) || defined(ANDROID)
const ov::util::Path& file_name = cut_android_path(file_name);
#endif
std::ifstream in(file_name, std::ios_base::binary | std::ios_base::ate);
const ov::util::Path& cut_path = cut_android_path(path);
std::ifstream in(cut_path, std::ios_base::binary | std::ios_base::ate);
return in.tellg();
#else
std::ifstream in(path, std::ios_base::binary | std::ios_base::ate);
return in.tellg();
#endif
}

/**
Expand Down

0 comments on commit 97f2a96

Please sign in to comment.