Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StateInfo 类型系统的 at 方法改为不存在则抛出 std::out_of_range 异常 #210

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

zhaoxi-scut
Copy link
Member

Pull Request 合并请求准备清单

详情参见此处

  • 我同意在 Apache 2 开源许可下为本项目做贡献
  • 此 pull request 是在正确的分支上提出的
  • 此 pull request 有对应的错误报告或其他待改进的内容
  • 我本地的 RMVL 进行了单元测试、性能测试,有对应的测试数据
  • 我提交的 feature 有很好的文档记录,并且可以使用 CMake 项目构建示例代码

具体内容

  • 原先的 at 方法在访问不存在的类型时,会返回 std::string 类型的 "unknown",现改变这一行为,改为由 STL 自行抛出 std::out_of_range 异常,同时返回类型更改为 const std::string &,与 std::unordered_mapat 方法行为一致

@zhaoxi-scut zhaoxi-scut added the optimization 代码重构、功能优化 label Jan 5, 2025
@zhaoxi-scut zhaoxi-scut added this to the 2.2.0 milestone Jan 5, 2025
@zhaoxi-scut zhaoxi-scut merged commit 01a9b8a into cv-rmvl:2.x Jan 5, 2025
8 checks passed
@zhaoxi-scut zhaoxi-scut deleted the state-info-dev branch January 5, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization 代码重构、功能优化
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants