Mercurial > octave
comparison liboctave/util/unwind-prot.h @ 21134:2e5c1f766ac9
provide replacement hints for deprecated C++ functions
* oct-conf-post.in.h (OCTAVE_DEPRECATED): Accept message argument.
* error.h, errwarn.h, gripes.h, symtab.h, variables.h,
* ov-base-sparse.h, ov-base.h, ov.h, Array.h, DiagArray2.h,
* PermMatrix.h, Range.h, Sparse.h, dSparse.h, lo-array-errwarn.h,
* lo-array-gripes.h, unwind-prot.h: Change all uses of
OCTAVE_DEPRECATED.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 22 Jan 2016 12:15:12 -0500 |
parents | dfcb9d74b253 |
children | 34368609f62b |
comparison
equal
deleted
inserted
replaced
21133:31674b9d202b | 21134:2e5c1f766ac9 |
---|---|
48 virtual void add (elem *new_elem) | 48 virtual void add (elem *new_elem) |
49 { | 49 { |
50 lifo.push (new_elem); | 50 lifo.push (new_elem); |
51 } | 51 } |
52 | 52 |
53 OCTAVE_DEPRECATED void add (void (*fcn) (void *), void *ptr = 0) | 53 OCTAVE_DEPRECATED ("use 'add (new fcn_arg_elem<void *> (fcn, ptr))' instead") |
54 void add (void (*fcn) (void *), void *ptr = 0) | |
54 { | 55 { |
55 add (new fcn_arg_elem<void *> (fcn, ptr)); | 56 add (new fcn_arg_elem<void *> (fcn, ptr)); |
56 } | 57 } |
57 | 58 |
58 operator bool (void) const { return ! empty (); } | 59 operator bool (void) const { return ! empty (); } |
59 | 60 |
60 OCTAVE_DEPRECATED void run_top (void) { run_first (); } | 61 OCTAVE_DEPRECATED ("use 'run_first' instead") |
62 void run_top (void) { run_first (); } | |
61 | 63 |
62 void run_first (void) | 64 void run_first (void) |
63 { | 65 { |
64 if (! empty ()) | 66 if (! empty ()) |
65 { | 67 { |
68 lifo.pop (); | 70 lifo.pop (); |
69 ptr->run (); | 71 ptr->run (); |
70 } | 72 } |
71 } | 73 } |
72 | 74 |
73 OCTAVE_DEPRECATED void run_top (int num) { run (num); } | 75 OCTAVE_DEPRECATED ("use 'run' instead") |
76 void run_top (int num) { run (num); } | |
74 | 77 |
75 OCTAVE_DEPRECATED void discard_top (void) { discard_first (); } | 78 OCTAVE_DEPRECATED ("use 'discard_first' instead") |
79 void discard_top (void) { discard_first (); } | |
76 | 80 |
77 void discard_first (void) | 81 void discard_first (void) |
78 { | 82 { |
79 if (! empty ()) | 83 if (! empty ()) |
80 { | 84 { |
82 lifo.pop (); | 86 lifo.pop (); |
83 delete ptr; | 87 delete ptr; |
84 } | 88 } |
85 } | 89 } |
86 | 90 |
87 OCTAVE_DEPRECATED void discard_top (int num) { discard (num); } | 91 OCTAVE_DEPRECATED ("use 'discard' instead") |
92 void discard_top (int num) { discard (num); } | |
88 | 93 |
89 size_t size (void) const { return lifo.size (); } | 94 size_t size (void) const { return lifo.size (); } |
90 | 95 |
91 protected: | 96 protected: |
92 | 97 |