From: David Wells Date: Wed, 3 Jul 2024 12:36:18 +0000 (-0400) Subject: Clean up some documentation for user pointers. X-Git-Tag: v9.6.0-rc1~135^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74cd7a66353016ed259a32e096ecc86aba9efc00;p=dealii.git Clean up some documentation for user pointers. --- diff --git a/include/deal.II/grid/tria_accessor.h b/include/deal.II/grid/tria_accessor.h index b8f7dc8e46..ef3cf0e2ac 100644 --- a/include/deal.II/grid/tria_accessor.h +++ b/include/deal.II/grid/tria_accessor.h @@ -1356,7 +1356,7 @@ public: set_user_pointer(void *p) const; /** - * Reset the user pointer to a @p nullptr pointer. See + * Reset the user pointer to `nullptr`. See * @ref GlossUserData * for more information. */ @@ -1365,14 +1365,16 @@ public: /** * Access the value of the user pointer. It is in the responsibility of the - * user to make sure that the pointer points to something useful. You should - * use the new style cast operator to maintain a minimum of type safety, - * e.g. + * user to make sure that the pointer points to something useful and always + * requires casting to a known type, e.g., * - * @note User pointers and user indices are mutually exclusive. Therefore, - * you can only use one of them, unless you call - * Triangulation::clear_user_data() in between. A - * *a=static_cast(cell->user_pointer());. + * @code + * auto *a = static_cast(cell->user_pointer()); + * @endcode + * + * @note User pointers and user indices are mutually exclusive. Therefore, you + * can only use one of them, unless you call Triangulation::clear_user_data() + * in between. * * See * @ref GlossUserData @@ -2680,7 +2682,7 @@ public: set_user_pointer(void *p) const; /** - * Reset the user pointer to a @p nullptr pointer. See + * Reset the user pointer to `nullptr`. See * @ref GlossUserData * for more information. */