Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Rethink geometry.require<ManagedQuantityName>

Abierto
#231 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp

Línea de trabajo

Start by locating the Geometry implementations of require and the existing ensure behavior. Trace how requireCount controls recalculation and how quantities are acquired in the relevant geometry methods. Done means the API exposes the proposed ensure methods without repeatedly incrementing requireCount, with behavior covered by the repository's applicable tests.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hey,

I noticed that once you do geometry.require<ManagedQuantityName> it will increment the requireCount. This means that in every method that needs the managed quantity, requireCount will be incremented every time. This somehow feels unclean.

This also means that the managed quantity will always be automatically recalculated, unless you explicitly do geometry.unrequire<ManagedQuantityName>.

I think it would make sense to expose the ensure<ManagedQuantityName> methods. You could do require<ManagedQuantityName> once on Geometry creation, and then just use ensure<ManagedQuantityName> whenever you need the quantity, not incrementing the count every time.

What do you think?

Lenguaje dominante
C++
Estrellas
1.3k
Forks
183
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nmwsharp/geometry-central

Todos los issues de nmwsharp/geometry-central

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.