Use keys stored in a namespace instead of string keys for C++
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cpp
调研方向
Start by locating the property getters, setters, and other checks that compare manually typed strings, then read the relevant handlers to see which keys they use. The issue proposes a PropertyNames.h file under Deltares.Probabilistic/Server/Handlers; done means those keys are defined in a namespace and the affected checks use them consistently.
由索引模型根据 Issue 内容生成。
描述
I propose we move away from using manually typed strings everywhere for property getters, setters and some others, and instead move the exact strings to a file like:
'Deltares.Probabilistic/Server/Handlers/PropertyNames.h'
namespace Deltares::Server::PropertyNames
{
namespace Common
{
inline constexpr const char* Variable = "variable";
inline constexpr const char* MinValue = "min_value";
inline constexpr const char* MaxValue = "max_value";
inline constexpr const char* StartValue = "start_value";
inline constexpr const char* Intervals = "intervals";
}
}
Allowing checks to look like this:
if (property_ == PropertyNames::Common::MinValue) { ... }
- 主要语言
- C++
- 星标
- 9
- 派生
- 1
- 平均合并
- 2 天 19 小时
- 30 天内合并 PR
- 11
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Deltares/ProbabilisticLibrary 的其他 Issue
-
documentation
难度 1/5 1 小时以内 新手友好度 85/100
Deltares/ProbabilisticLibrary#340 ·
维护者通常 2 天内回复
-
Remove enumeration of known types from server handling可能已有人在做 @epsig 于 4 天前认领。 未关闭enhancement
Deltares/ProbabilisticLibrary#413 · 2 条评论 · 已指派 2 人 ·
维护者通常 2 天内回复
-
enhancement Prob lib C++
难度 5/5 一周以上 新手友好度 35/100
Deltares/ProbabilisticLibrary#411 ·
维护者通常 2 天内回复
-
enhancement Prob lib C++
难度 4/5 3-5 天 新手友好度 43/100
Deltares/ProbabilisticLibrary#410 ·
维护者通常 2 天内回复
-
enhancement Prob lib C++
难度 4/5 3-5 天 新手友好度 42/100
Deltares/ProbabilisticLibrary#409 ·
维护者通常 2 天内回复
查看 Deltares/ProbabilisticLibrary 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 2 天内回复
-
bug data-types
难度 2/5 1-3 小时 新手友好度 76/100
ClickHouse/clickhouse-cpp#645 ·
维护者通常 1 天内回复
-
bug compatibility difficulty:easy prio:normal
难度 2/5 1-3 小时 新手友好度 74/100
NatronGitHub/openfx-misc#524 ·
维护者通常 1 天内回复
-
documentation enhancement help wanted P0
难度 2/5 1-3 小时 新手友好度 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
维护者通常 1 天内回复
-
Type: Bug
难度 2/5 1-3 小时 新手友好度 82/100
openscad/openscad#7360 · 2 条评论 ·
维护者通常 1 天内回复