Skip to content

Commit

Permalink
etc: Put reminders for changing pretty printers in CPP classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Apr 20, 2024
1 parent b92138d commit 0aa78a0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libopenage/coord/coord.h.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2023 the openage authors. See copying.md for legal info.
// Copyright 2016-2024 the openage authors. See copying.md for legal info.

#pragma once

Expand All @@ -24,6 +24,9 @@ namespace coord {
*
* 'Absolute' and 'Relative' are the absolute and relative types of the
* derived class (CRTP).
*
* If you change this class, remember to update the gdb pretty printers
* in etc/gdb_pretty/printers.py.
*/
template<typename CoordType, typename Absolute, typename Relative>
struct Coord${camelcase}Absolute {
Expand Down Expand Up @@ -87,6 +90,9 @@ struct Coord${camelcase}Absolute {
*
* 'Absolute' and 'Relative' are the absolute and relative types of the
* derived class (CRTP).
*
* If you change this class, remember to update the gdb pretty printers
* in etc/gdb_pretty/printers.py.
*/
template<typename CoordType, typename Absolute, typename Relative>
struct Coord${camelcase}Relative {
Expand Down
3 changes: 3 additions & 0 deletions libopenage/curve/keyframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ namespace openage::curve {
/**
* A element of the curvecontainer. This is especially used to keep track of
* the value-timing.
*
* If you change this class, remember to update the gdb pretty printers
* in etc/gdb_pretty/printers.py.
*/
template <typename T>
class Keyframe {
Expand Down
3 changes: 3 additions & 0 deletions libopenage/util/fixed_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ constexpr static
* For example,
* FixedPoint<int64_t, 32>
* can store values from -2**32 to +2**32 with a constant precision of 2**-32.
*
* If you change this class, remember to update the gdb pretty printers
* in etc/gdb_pretty/printers.py.
*/
template <typename int_type, unsigned int fractional_bits>
class FixedPoint {
Expand Down
3 changes: 3 additions & 0 deletions libopenage/util/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ namespace openage::util {
*
* N = dimensions
* T = underlying single value type (double, float, ...)
*
* If you change this class, remember to update the gdb pretty printers
* in etc/gdb_pretty/printers.py.
*/
template <size_t N, typename T>
class Vector : public std::array<T, N> {
Expand Down

0 comments on commit 0aa78a0

Please sign in to comment.