when to use std::int32_t and std::int64_t
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Xem lại các cuộc thảo luận trước đây trong các pull request 95, 88 và 89, sau đó kiểm tra các cách sử dụng số nguyên được liệt kê trong src/util.hpp và src/vtquery.cpp. Công việc được xem là hoàn tất khi đạt được sự thống nhất về thời điểm nên sử dụng từng độ rộng số nguyên và quyết định đưa ra được ghi lại hoặc áp dụng trong các hàm được tham chiếu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Looks like there have been some conversations around this and thought we should discuss all the places where we need to be explicit about the bit size of the int and when we shouldn't. I'll start us off with refs to previous conversations and lists of our current int32_t and int64_t usage. It would be great to get some follow-up comments about the reasoning behind this.
It looks like the idea is that we want to use int32_t for x, y, z, and extent until we cast them to doubles or int64_ts when we store them in a mapbox::geometry::point. Looks like we use int64_t for id and property values, referred to as v in the code.
References
- https://github.com/mapbox/vtquery/pull/95#discussion_r198340002
- https://github.com/mapbox/vtquery/pull/88
- https://github.com/mapbox/vtquery/pull/89
int32_t/ uint32_t usage
create_query_point- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L54-L57convert_vt_to_ll- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L84-L87TileObject- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L64-L66 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L93-L95QueryData- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L102 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L128Execute- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L278 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L301-L304HandleOKCallback- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L433NAN_METHOD(vtquery)- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L507-L536 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L605-L613 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L651
int64_t/ uint64_t usage
mapbox::util::variant- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L40create_query_point- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L52 & https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L68-L78convert_vt_to_ll- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L89ResultObject- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L44property_value_visitor- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L144-L147insert_result- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L201Execute- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L306 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L317
- Ngôn ngữ chính
- JavaScript
- Star
- 45
- Fork
- 14
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
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 mapbox/vtquery
-
Remove mason-js dependencyĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
More efficient response formatĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
-
union geometriesĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
dedupe is too strongĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của mapbox/vtquery
Issue tương tự
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
vercel/ai#21528 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
status: waiting triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
freeCodeCamp/freeCodeCamp#70412 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
rohitg00/ai-engineering-from-scratch#490 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 6 ngày