Rescope raylib.h into raylib::impl namespace
还没有人认领这个 Issue。
评估
调研方向
Start in the raylib-cpp include wrapper and inspect how raylib.h is included, along with the scope operators that refer to its declarations. Check whether the existing extern "C" guards in raylib.h cover the include, then verify that the header can be moved into raylib::impl without global namespace pollution or broken references.
由索引模型根据 Issue 内容生成。
描述
Currently, the following code is included outside of namespace raylib, which pollutes the global namespace with raylib functions and types which can occasionally cause collisions. Is it possible to move this include into the raylib namespace? Many of the scope operators will have to be adjusted but I think this might result in some cleaner code. Also, I believe that the __cplusplus guards are not necessary when directly including a c header. I think this is typically used around C code that can be compiled by both a c & c++ compiler. The extern "C" is definitely still necessary though. Apologies if I am missing something.
https://isocpp.org/wiki/faq/mixing-c-and-cpp#include-c-hdrs-system
#ifdef __cplusplus
extern "C" {
#endif
#include "raylib.h"
#ifdef __cplusplus
}
#endif
Edit: extern "C" guards are in raylib.h already. It does not appear that it is necessary to include it in raylib-cpp
- 主要语言
- C++
- 星标
- 960
- 派生
- 120
- 平均合并
- 10 分钟
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RobLoach/raylib-cpp 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
RobLoach/raylib-cpp#425 ·
-
难度 4/5 3-5 天 新手友好度 35/100
RobLoach/raylib-cpp#427 ·
-
Code gen 未关闭
难度 5/5 一周以上 新手友好度 30/100
RobLoach/raylib-cpp#415 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 45/100
RobLoach/raylib-cpp#370 · 1 条评论 ·
-
SDF Font Support 未关闭
难度 3/5 1-2 天 新手友好度 55/100
RobLoach/raylib-cpp#366 · 3 条评论 ·
查看 RobLoach/raylib-cpp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
duckdb/duckdb-wasm#2258 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend 未关闭coarray
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·