Skip to content

Commit

Permalink
[luci/import] model_data as const (#14260)
Browse files Browse the repository at this point in the history
This will revise importModule method to accept const argument.

Signed-off-by: SaeHie Park <[email protected]>
  • Loading branch information
seanshpark authored Oct 28, 2024
1 parent 1c7bbb9 commit 067baf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler/luci/import/include/luci/ImporterEx.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ImporterEx final
// embedded-import-value-test uses constant data from file(actually ROM)
// so unloading file will break the precondition
// TODO remove this after embedded-import-value-test has moved to onert-micro
std::unique_ptr<Module> importModule(std::vector<char> &model_data) const;
std::unique_ptr<Module> importModule(const std::vector<char> &model_data) const;

private:
const GraphBuilderSource *_source = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions compiler/luci/import/src/ImporterEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ std::unique_ptr<Module> ImporterEx::importVerifyModule(const std::string &input_
return importer.importModule(data_data, data_size);
}

std::unique_ptr<Module> ImporterEx::importModule(std::vector<char> &model_data) const
std::unique_ptr<Module> ImporterEx::importModule(const std::vector<char> &model_data) const
{
auto data_data = reinterpret_cast<uint8_t *>(model_data.data());
auto data_data = reinterpret_cast<const uint8_t *>(model_data.data());
auto data_size = model_data.size();

Importer importer(_source);
Expand Down

0 comments on commit 067baf8

Please sign in to comment.