Skip to content

Commit

Permalink
Remove use of designated initializers in tflite_model_loader.cc
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 718109906
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Jan 22, 2025
1 parent 5c305c0 commit b7d305f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mediapipe/util/tflite/tflite_model_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ absl::StatusOr<api2::Packet<TfLiteModelPtr>> TfLiteModelLoader::LoadFromPath(
std::unique_ptr<Resource> model_resource,
resources.Get(
model_path,
Resources::Options{
.mmap_mode = try_mmap ? std::make_optional(MMapMode::kMMapOrRead)
: std::nullopt}));
Resources::Options{/* read_as_binary= */ true,
/* mmap_mode= */ try_mmap
? std::make_optional(MMapMode::kMMapOrRead)
: std::nullopt}));
absl::string_view model_view = model_resource->ToStringView();
auto model = FlatBufferModel::VerifyAndBuildFromBuffer(model_view.data(),
model_view.size());
Expand Down

0 comments on commit b7d305f

Please sign in to comment.