Skip to content

Commit 05ed918

Browse files
committed
general: mark deprecated methods with the @deprecated tag
This makes them easier to find and, if necessary, automatically generate deprecation warnings for.
1 parent 73d6c52 commit 05ed918

File tree

14 files changed

+74
-73
lines changed

14 files changed

+74
-73
lines changed

panda/src/bullet/bulletWorld.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ remove(TypedObject *object) {
363363
}
364364

365365
/**
366-
* Deprecated! Please use BulletWorld::attach
366+
* @deprecated Please use BulletWorld::attach
367367
*/
368368
void BulletWorld::
369369
attach_rigid_body(BulletRigidBodyNode *node) {
@@ -373,7 +373,7 @@ attach_rigid_body(BulletRigidBodyNode *node) {
373373
}
374374

375375
/**
376-
* Deprecated.! Please use BulletWorld::remove
376+
* @deprecated Please use BulletWorld::remove
377377
*/
378378
void BulletWorld::
379379
remove_rigid_body(BulletRigidBodyNode *node) {
@@ -383,7 +383,7 @@ remove_rigid_body(BulletRigidBodyNode *node) {
383383
}
384384

385385
/**
386-
* Deprecated! Please use BulletWorld::attach
386+
* @deprecated Please use BulletWorld::attach
387387
*/
388388
void BulletWorld::
389389
attach_soft_body(BulletSoftBodyNode *node) {
@@ -393,7 +393,7 @@ attach_soft_body(BulletSoftBodyNode *node) {
393393
}
394394

395395
/**
396-
* Deprecated.! Please use BulletWorld::remove
396+
* @deprecated Please use BulletWorld::remove
397397
*/
398398
void BulletWorld::
399399
remove_soft_body(BulletSoftBodyNode *node) {
@@ -403,7 +403,7 @@ remove_soft_body(BulletSoftBodyNode *node) {
403403
}
404404

405405
/**
406-
* Deprecated! Please use BulletWorld::attach
406+
* @deprecated Please use BulletWorld::attach
407407
*/
408408
void BulletWorld::
409409
attach_ghost(BulletGhostNode *node) {
@@ -413,7 +413,7 @@ attach_ghost(BulletGhostNode *node) {
413413
}
414414

415415
/**
416-
* Deprecated.! Please use BulletWorld::remove
416+
* @deprecated Please use BulletWorld::remove
417417
*/
418418
void BulletWorld::
419419
remove_ghost(BulletGhostNode *node) {
@@ -423,7 +423,7 @@ remove_ghost(BulletGhostNode *node) {
423423
}
424424

425425
/**
426-
* Deprecated! Please use BulletWorld::attach
426+
* @deprecated Please use BulletWorld::attach
427427
*/
428428
void BulletWorld::
429429
attach_character(BulletBaseCharacterControllerNode *node) {
@@ -433,7 +433,7 @@ attach_character(BulletBaseCharacterControllerNode *node) {
433433
}
434434

435435
/**
436-
* Deprecated.! Please use BulletWorld::remove
436+
* @deprecated Please use BulletWorld::remove
437437
*/
438438
void BulletWorld::
439439
remove_character(BulletBaseCharacterControllerNode *node) {
@@ -443,7 +443,7 @@ remove_character(BulletBaseCharacterControllerNode *node) {
443443
}
444444

445445
/**
446-
* Deprecated! Please use BulletWorld::attach
446+
* @deprecated Please use BulletWorld::attach
447447
*/
448448
void BulletWorld::
449449
attach_vehicle(BulletVehicle *vehicle) {
@@ -453,7 +453,7 @@ attach_vehicle(BulletVehicle *vehicle) {
453453
}
454454

455455
/**
456-
* Deprecated.! Please use BulletWorld::remove
456+
* @deprecated Please use BulletWorld::remove
457457
*/
458458
void BulletWorld::
459459
remove_vehicle(BulletVehicle *vehicle) {
@@ -474,7 +474,7 @@ attach_constraint(BulletConstraint *constraint, bool linked_collision) {
474474
}
475475

476476
/**
477-
* Deprecated.! Please use BulletWorld::remove
477+
* @deprecated Please use BulletWorld::remove
478478
*/
479479
void BulletWorld::
480480
remove_constraint(BulletConstraint *constraint) {

panda/src/char/character.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point, bool &found_any,
243243
* pointer within this node will be replaced with the new_bundle pointer, and
244244
* all geometry within this node will be updated to reference new_bundle.
245245
*
246-
* This method is deprecated. Use the newer version of this method, below.
246+
* @deprecated Use the newer version of this method, below.
247247
*/
248248
void Character::
249249
merge_bundles(PartBundle *old_bundle, PartBundle *new_bundle) {
@@ -417,7 +417,7 @@ write_part_values(std::ostream &out) const {
417417
* character's position to the current frame, regardless of whether the
418418
* character is currently onscreen and animating.
419419
*
420-
* This method is deprecated. Call update() instead.
420+
* @deprecated Call update() instead.
421421
*/
422422
void Character::
423423
update_to_now() {

panda/src/collide/collisionHandlerEvent.I

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ add_in_pattern(const std::string &in_pattern) {
8080
/**
8181
* This method is deprecated; it completely replaces all the in patterns that
8282
* have previously been set with the indicated pattern.
83+
*
84+
* @deprecated Use add_in_pattern() instead.
8385
*/
8486
INLINE void CollisionHandlerEvent::
8587
set_in_pattern(const std::string &in_pattern) {
@@ -133,6 +135,8 @@ add_again_pattern(const std::string &again_pattern) {
133135
/**
134136
* This method is deprecated; it completely replaces all the in patterns that
135137
* have previously been set with the indicated pattern.
138+
*
139+
* @deprecated Use add_again_pattern() instead.
136140
*/
137141
INLINE void CollisionHandlerEvent::
138142
set_again_pattern(const std::string &again_pattern) {
@@ -184,6 +188,8 @@ add_out_pattern(const std::string &out_pattern) {
184188
/**
185189
* This method is deprecated; it completely replaces all the in patterns that
186190
* have previously been set with the indicated pattern.
191+
*
192+
* @deprecated Use add_out_pattern() instead.
187193
*/
188194
INLINE void CollisionHandlerEvent::
189195
set_out_pattern(const std::string &out_pattern) {

panda/src/display/graphicsOutput.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,8 @@ add_render_texture(Texture *tex, RenderTextureMode mode,
375375
* This is a deprecated interface that made sense back when GraphicsOutputs
376376
* could only render into one texture at a time. From now on, use
377377
* clear_render_textures and add_render_texture instead.
378+
*
379+
* @deprecated Use add_render_texture() instead.
378380
*/
379381
void GraphicsOutput::
380382
setup_render_texture(Texture *tex, bool allow_bind, bool to_ram) {

panda/src/distort/nonlinearImager.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ NonlinearImager::
4949
/**
5050
* This version of this method is deprecated and will soon be removed. Use
5151
* the version that takes two parameters instead.
52+
*
53+
* @deprecated Use the version that takes two parameters instead.
5254
*/
5355
int NonlinearImager::
5456
add_screen(ProjectionScreen *screen) {

panda/src/egg/eggPrimitive.I

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ get_connected_shading() const {
109109
/**
110110
* Replaces the current list of textures with the indicated texture.
111111
*
112-
* This method is deprecated and is used in support of single-texturing only.
112+
* @deprecated This method is used in support of single-texturing only.
113113
* Please use the multitexture variant add_texture instead.
114114
*/
115115
INLINE void EggPrimitive::
@@ -121,7 +121,7 @@ set_texture(EggTexture *texture) {
121121
/**
122122
* Returns true if the primitive has any textures specified, false otherwise.
123123
*
124-
* This method is deprecated and is used in support of single-texturing only.
124+
* @deprecated This method is used in support of single-texturing only.
125125
* New code should be written to use the multitexture variants instead.
126126
*/
127127
INLINE bool EggPrimitive::
@@ -143,7 +143,7 @@ has_texture(EggTexture *texture) const {
143143
* Returns the first texture on the primitive, if any, or NULL if there are no
144144
* textures on the primitive.
145145
*
146-
* This method is deprecated and is used in support of single-texturing only.
146+
* @deprecated This method is used in support of single-texturing only.
147147
* New code should be written to use the multitexture variants instead.
148148
*/
149149
INLINE EggTexture *EggPrimitive::

panda/src/egg2pg/eggLoader.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ make_nurbs_curve(EggNurbsCurve *egg_curve, PandaNode *parent,
726726
* This deprecated interface creates a NurbsCurve object for the EggNurbsCurve
727727
* entry. It will eventually be removed in favor of the above, which creates
728728
* a RopeNode.
729+
*
730+
* @deprecated See make_nurbs_curve.
729731
*/
730732
void EggLoader::
731733
make_old_nurbs_curve(EggNurbsCurve *egg_curve, PandaNode *parent,

panda/src/event/eventQueue.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ is_queue_empty() const {
8181
}
8282

8383
/**
84-
* This function is deprecated--the queue is never full these days.
84+
* @deprecated Always returns false; the queue can never be full.
8585
*/
8686
bool EventQueue::
8787
is_queue_full() const {

panda/src/linmath/lvector3_src.I

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ signed_angle_deg(const FLOATNAME(LVector3) &other,
230230
}
231231

232232
/**
233-
* This method is deprecated. Do not use.
233+
* @deprecated Do not use.
234234
*/
235235
INLINE_LINMATH FLOATTYPE FLOATNAME(LVector3)::
236236
relative_angle_rad(const FLOATNAME(LVector3) &other) const {
237237
return atan2((_v(0)*other._v(1))-(_v(1)*other._v(0)), dot(other));
238238
}
239239

240240
/**
241-
* This method is deprecated. Do not use.
241+
* @deprecated Do not use.
242242
*/
243243
INLINE_LINMATH FLOATTYPE FLOATNAME(LVector3)::
244244
relative_angle_deg(const FLOATNAME(LVector3) &other) const {

panda/src/pgraph/clipPlaneAttrib.cxx

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ class ComparePlaneNodePriorities {
4545
* Constructs a new ClipPlaneAttrib object that enables (or disables,
4646
* according to op) the indicated plane(s).
4747
*
48-
* This method is now deprecated. Use add_on_plane() or add_off_plane()
49-
* instead.
48+
* @deprecated Use add_on_plane() or add_off_plane() instead.
5049
*/
5150
CPT(RenderAttrib) ClipPlaneAttrib::
5251
make(ClipPlaneAttrib::Operation op, PlaneNode *plane) {
@@ -80,8 +79,7 @@ make(ClipPlaneAttrib::Operation op, PlaneNode *plane) {
8079
* Constructs a new ClipPlaneAttrib object that turns on (or off, according to
8180
* op) the indicate plane(s).
8281
*
83-
* This method is now deprecated. Use add_on_plane() or add_off_plane()
84-
* instead.
82+
* @deprecated Use add_on_plane() or add_off_plane() instead.
8583
*/
8684
CPT(RenderAttrib) ClipPlaneAttrib::
8785
make(ClipPlaneAttrib::Operation op, PlaneNode *plane1, PlaneNode *plane2) {
@@ -118,8 +116,7 @@ make(ClipPlaneAttrib::Operation op, PlaneNode *plane1, PlaneNode *plane2) {
118116
* Constructs a new ClipPlaneAttrib object that turns on (or off, according to
119117
* op) the indicate plane(s).
120118
*
121-
* This method is now deprecated. Use add_on_plane() or add_off_plane()
122-
* instead.
119+
* @deprecated Use add_on_plane() or add_off_plane() instead.
123120
*/
124121
CPT(RenderAttrib) ClipPlaneAttrib::
125122
make(ClipPlaneAttrib::Operation op, PlaneNode *plane1, PlaneNode *plane2,
@@ -160,8 +157,7 @@ make(ClipPlaneAttrib::Operation op, PlaneNode *plane1, PlaneNode *plane2,
160157
* Constructs a new ClipPlaneAttrib object that turns on (or off, according to
161158
* op) the indicate plane(s).
162159
*
163-
* This method is now deprecated. Use add_on_plane() or add_off_plane()
164-
* instead.
160+
* @deprecated Use add_on_plane() or add_off_plane() instead.
165161
*/
166162
CPT(RenderAttrib) ClipPlaneAttrib::
167163
make(ClipPlaneAttrib::Operation op, PlaneNode *plane1, PlaneNode *plane2,
@@ -217,9 +213,9 @@ make_default() {
217213
* were already on, and if O_remove, the planes here are removed from the set
218214
* of planes that were on.
219215
*
220-
* This method is now deprecated. ClipPlaneAttribs nowadays have a separate
221-
* list of on_planes and off_planes, so this method doesn't make sense. Query
222-
* the lists independently.
216+
* @deprecated ClipPlaneAttribs nowadays have a separate list of on_planes and
217+
* off_planes, so this method no longer makes sense. Query the lists
218+
* independently.
223219
*/
224220
ClipPlaneAttrib::Operation ClipPlaneAttrib::
225221
get_operation() const {
@@ -240,9 +236,9 @@ get_operation() const {
240236
/**
241237
* Returns the number of planes listed in the attribute.
242238
*
243-
* This method is now deprecated. ClipPlaneAttribs nowadays have a separate
244-
* list of on_planes and off_planes, so this method doesn't make sense. Query
245-
* the lists independently.
239+
* @deprecated ClipPlaneAttribs nowadays have a separate list of on_planes and
240+
* off_planes, so this method no longer makes sense. Query the lists
241+
* independently.
246242
*/
247243
int ClipPlaneAttrib::
248244
get_num_planes() const {
@@ -259,9 +255,9 @@ get_num_planes() const {
259255
/**
260256
* Returns the nth plane listed in the attribute.
261257
*
262-
* This method is now deprecated. ClipPlaneAttribs nowadays have a separate
263-
* list of on_planes and off_planes, so this method doesn't make sense. Query
264-
* the lists independently.
258+
* @deprecated ClipPlaneAttribs nowadays have a separate list of on_planes and
259+
* off_planes, so this method no longer makes sense. Query the lists
260+
* independently.
265261
*/
266262
PlaneNode *ClipPlaneAttrib::
267263
get_plane(int n) const {
@@ -279,9 +275,9 @@ get_plane(int n) const {
279275
* Returns true if the indicated plane is listed in the attrib, false
280276
* otherwise.
281277
*
282-
* This method is now deprecated. ClipPlaneAttribs nowadays have a separate
283-
* list of on_planes and off_planes, so this method doesn't make sense. Query
284-
* the lists independently.
278+
* @deprecated ClipPlaneAttribs nowadays have a separate list of on_planes and
279+
* off_planes, so this method no longer makes sense. Query the lists
280+
* independently.
285281
*/
286282
bool ClipPlaneAttrib::
287283
has_plane(PlaneNode *plane) const {
@@ -299,8 +295,7 @@ has_plane(PlaneNode *plane) const {
299295
* Returns a new ClipPlaneAttrib, just like this one, but with the indicated
300296
* plane added to the list of planes.
301297
*
302-
* This method is now deprecated. Use add_on_plane() or add_off_plane()
303-
* instead.
298+
* @deprecated Use add_on_plane() or add_off_plane() instead.
304299
*/
305300
CPT(RenderAttrib) ClipPlaneAttrib::
306301
add_plane(PlaneNode *plane) const {
@@ -318,8 +313,7 @@ add_plane(PlaneNode *plane) const {
318313
* Returns a new ClipPlaneAttrib, just like this one, but with the indicated
319314
* plane removed from the list of planes.
320315
*
321-
* This method is now deprecated. Use remove_on_plane() or remove_off_plane()
322-
* instead.
316+
* @deprecated Use remove_on_plane() or remove_off_plane() instead.
323317
*/
324318
CPT(RenderAttrib) ClipPlaneAttrib::
325319
remove_plane(PlaneNode *plane) const {

0 commit comments

Comments
 (0)