Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

when to use std::int32_t and std::int64_t

未关闭
#98 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
技术栈
cpp
领域
api, backend

调研方向

查看 pull request 95、88 和 89 中之前的讨论,然后检查 src/util.hpp 和 src/vtquery.cpp 中列出的整数用法。就何时应使用每种整数宽度达成一致,并在所引用的函数中记录或应用由此产生的决定,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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

int32_t/ uint32_t usage

int64_t/ uint64_t usage

主要语言
JavaScript
星标
45
派生
14
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

mapbox/vtquery 的其他 Issue

查看 mapbox/vtquery 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。