Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build-ios-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ install_name_tool \
sherpa_onnx

chmod +x sherpa_onnx
strip -x sherpa_onnx
popd

pushd ios-arm64_x86_64-simulator
Expand All @@ -214,6 +215,7 @@ install_name_tool \
sherpa_onnx

chmod +x sherpa_onnx
strip -x sherpa_onnx
popd

for d in ios-arm64_x86_64-simulator ios-arm64; do
Expand Down
2 changes: 1 addition & 1 deletion sherpa-onnx/csrc/offline-catt-model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class OfflineCATTModel::Impl {
return std::move(ans[0]);
}

OrtAllocator *Allocator() const { return allocator_; }
OrtAllocator *Allocator() { return allocator_; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To preserve the const-correctness of the Impl::Allocator() method, you can mark the allocator_ member variable as mutable (at line 118). This allows you to keep Allocator() const as const without compilation errors, maintaining consistency with OfflineCATTModel::Allocator() const.


private:
void InitEncoder() {
Expand Down
Loading