Rescope raylib.h into raylib::impl namespace
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C++
- Star
- 960
- Fork
- 120
- Merge trung bình
- 10 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RobLoach/raylib-cpp
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
RobLoach/raylib-cpp#425 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
RobLoach/raylib-cpp#427 ·
-
Code gen Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
RobLoach/raylib-cpp#415 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
RobLoach/raylib-cpp#370 · 1 bình luận ·
-
SDF Font Support Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
RobLoach/raylib-cpp#366 · 3 bình luận ·
Tất cả issue của RobLoach/raylib-cpp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
duckdb/duckdb-wasm#2258 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
objectionary/eo-graphs#75 ·
-
Coarray integration tests carry no LABELS, so run_tests.py silently skips them under every backend Đang mởcoarray
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
FISCO-BCOS/FISCO-BCOS#5642 ·