Skip to content

Commit fa1c480

Browse files
committed
general: clean up use of override keyword
1 parent 48c811e commit fa1c480

15 files changed

+105
-150
lines changed

dtool/src/dtoolbase/dtoolbase_cc.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ using namespace std;
3737
#define ALWAYS_INLINE_CONSTEXPR constexpr
3838
#define NOEXCEPT noexcept
3939
#define FINAL final
40-
#define OVERRIDE override
4140
#define MOVE(x) x
4241
#define DEFAULT_CTOR = default
4342
#define DEFAULT_DTOR = default
@@ -167,7 +166,6 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
167166
# endif
168167
# if __has_extension(cxx_override_control) && (__cplusplus >= 201103L)
169168
# define FINAL final
170-
# define OVERRIDE override
171169
# endif
172170
# if __has_extension(cxx_defaulted_functions)
173171
# define DEFAULT_CTOR = default
@@ -198,7 +196,6 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
198196
// Starting at GCC 4.7
199197
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
200198
# define FINAL final
201-
# define OVERRIDE override
202199
# endif
203200

204201
// GCC defines several macros which we can query. List of all supported
@@ -212,11 +209,9 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
212209
# define NOEXCEPT noexcept
213210
# define USE_MOVE_SEMANTICS
214211
# define FINAL final
215-
# define OVERRIDE override
216212
# define MOVE(x) move(x)
217213
#elif defined(_MSC_VER) && _MSC_VER >= 1600 // Visual Studio 2010
218214
# define NOEXCEPT throw()
219-
# define OVERRIDE override
220215
# define USE_MOVE_SEMANTICS
221216
# define FINAL sealed
222217
# define MOVE(x) move(x)
@@ -245,9 +240,6 @@ template<class T> typename remove_reference<T>::type &&move(T &&t) {
245240
#ifndef FINAL
246241
# define FINAL
247242
#endif
248-
#ifndef OVERRIDE
249-
# define OVERRIDE
250-
#endif
251243
#ifndef DEFAULT_CTOR
252244
# define DEFAULT_CTOR {}
253245
#endif

panda/src/egg/eggLine.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ class EXPCL_PANDAEGG EggLine : public EggCompositePrimitive {
2929
INLINE EggLine &operator = (const EggLine &copy);
3030
virtual ~EggLine();
3131

32-
virtual EggLine *make_copy() const OVERRIDE;
32+
virtual EggLine *make_copy() const override;
3333

34-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
34+
virtual void write(ostream &out, int indent_level) const override;
3535

3636
INLINE bool has_thick() const;
3737
INLINE double get_thick() const;
3838
INLINE void set_thick(double thick);
3939
INLINE void clear_thick();
4040

4141
protected:
42-
virtual int get_num_lead_vertices() const OVERRIDE;
42+
virtual int get_num_lead_vertices() const override;
4343

4444
private:
4545
double _thick;
@@ -54,10 +54,10 @@ class EXPCL_PANDAEGG EggLine : public EggCompositePrimitive {
5454
register_type(_type_handle, "EggLine",
5555
EggCompositePrimitive::get_class_type());
5656
}
57-
virtual TypeHandle get_type() const OVERRIDE {
57+
virtual TypeHandle get_type() const override {
5858
return get_class_type();
5959
}
60-
virtual TypeHandle force_init_type() OVERRIDE {
60+
virtual TypeHandle force_init_type() override {
6161
init_type();
6262
return get_class_type();
6363
}

panda/src/egg/eggNurbsCurve.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve {
2929
INLINE EggNurbsCurve(const EggNurbsCurve &copy);
3030
INLINE EggNurbsCurve &operator = (const EggNurbsCurve &copy);
3131

32-
virtual EggNurbsCurve *make_copy() const OVERRIDE;
32+
virtual EggNurbsCurve *make_copy() const override;
3333

3434
void setup(int order, int num_knots);
3535

@@ -50,7 +50,7 @@ class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve {
5050
INLINE double get_knot(int k) const;
5151
MAKE_SEQ(get_knots, get_num_knots, get_knot);
5252

53-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
53+
virtual void write(ostream &out, int indent_level) const override;
5454

5555
MAKE_PROPERTY(order, get_order, set_order);
5656
MAKE_PROPERTY(degree, get_degree);
@@ -72,10 +72,10 @@ class EXPCL_PANDAEGG EggNurbsCurve : public EggCurve {
7272
register_type(_type_handle, "EggNurbsCurve",
7373
EggCurve::get_class_type());
7474
}
75-
virtual TypeHandle get_type() const OVERRIDE {
75+
virtual TypeHandle get_type() const override {
7676
return get_class_type();
7777
}
78-
virtual TypeHandle force_init_type() OVERRIDE {
78+
virtual TypeHandle force_init_type() override {
7979
init_type();
8080
return get_class_type();
8181
}

panda/src/egg/eggNurbsSurface.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class EXPCL_PANDAEGG EggNurbsSurface : public EggSurface {
3636
INLINE EggNurbsSurface(const EggNurbsSurface &copy);
3737
INLINE EggNurbsSurface &operator = (const EggNurbsSurface &copy);
3838

39-
virtual EggNurbsSurface *make_copy() const OVERRIDE;
39+
virtual EggNurbsSurface *make_copy() const override;
4040

4141
void setup(int u_order, int v_order,
4242
int num_u_knots, int num_v_knots);
@@ -75,14 +75,14 @@ class EXPCL_PANDAEGG EggNurbsSurface : public EggSurface {
7575
MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot);
7676
INLINE EggVertex *get_cv(int ui, int vi) const;
7777

78-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
78+
virtual void write(ostream &out, int indent_level) const override;
7979

8080
public:
8181
Curves _curves_on_surface;
8282
Trims _trims;
8383

8484
protected:
85-
virtual void r_apply_texmats(EggTextureCollection &textures) OVERRIDE;
85+
virtual void r_apply_texmats(EggTextureCollection &textures) override;
8686

8787
private:
8888
typedef vector_double Knots;
@@ -101,10 +101,10 @@ class EXPCL_PANDAEGG EggNurbsSurface : public EggSurface {
101101
register_type(_type_handle, "EggNurbsSurface",
102102
EggSurface::get_class_type());
103103
}
104-
virtual TypeHandle get_type() const OVERRIDE {
104+
virtual TypeHandle get_type() const override {
105105
return get_class_type();
106106
}
107-
virtual TypeHandle force_init_type() OVERRIDE {
107+
virtual TypeHandle force_init_type() override {
108108
init_type();
109109
return get_class_type();
110110
}

panda/src/egg/eggPatch.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class EXPCL_PANDAEGG EggPatch : public EggPrimitive {
2828
INLINE EggPatch(const EggPatch &copy);
2929
INLINE EggPatch &operator = (const EggPatch &copy);
3030

31-
virtual EggPatch *make_copy() const OVERRIDE;
31+
virtual EggPatch *make_copy() const override;
3232

33-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
33+
virtual void write(ostream &out, int indent_level) const override;
3434

3535
public:
3636
static TypeHandle get_class_type() {
@@ -41,10 +41,10 @@ class EXPCL_PANDAEGG EggPatch : public EggPrimitive {
4141
register_type(_type_handle, "EggPatch",
4242
EggPrimitive::get_class_type());
4343
}
44-
virtual TypeHandle get_type() const OVERRIDE {
44+
virtual TypeHandle get_type() const override {
4545
return get_class_type();
4646
}
47-
virtual TypeHandle force_init_type() OVERRIDE {
47+
virtual TypeHandle force_init_type() override {
4848
init_type();
4949
return get_class_type();
5050
}

panda/src/egg/eggPoint.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class EXPCL_PANDAEGG EggPoint : public EggPrimitive {
2828
INLINE EggPoint(const EggPoint &copy);
2929
INLINE EggPoint &operator = (const EggPoint &copy);
3030

31-
virtual EggPoint *make_copy() const OVERRIDE;
31+
virtual EggPoint *make_copy() const override;
3232

3333
INLINE bool has_thick() const;
3434
INLINE double get_thick() const;
@@ -40,9 +40,9 @@ class EXPCL_PANDAEGG EggPoint : public EggPrimitive {
4040
INLINE void set_perspective(bool perspective);
4141
INLINE void clear_perspective();
4242

43-
virtual bool cleanup() OVERRIDE;
43+
virtual bool cleanup() override;
4444

45-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
45+
virtual void write(ostream &out, int indent_level) const override;
4646

4747
private:
4848
enum Flags {
@@ -64,10 +64,10 @@ class EXPCL_PANDAEGG EggPoint : public EggPrimitive {
6464
register_type(_type_handle, "EggPoint",
6565
EggPrimitive::get_class_type());
6666
}
67-
virtual TypeHandle get_type() const OVERRIDE {
67+
virtual TypeHandle get_type() const override {
6868
return get_class_type();
6969
}
70-
virtual TypeHandle force_init_type() OVERRIDE {
70+
virtual TypeHandle force_init_type() override {
7171
init_type();
7272
return get_class_type();
7373
}

panda/src/egg/eggPolygon.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class EXPCL_PANDAEGG EggPolygon : public EggPrimitive {
2727
INLINE EggPolygon(const EggPolygon &copy);
2828
INLINE EggPolygon &operator = (const EggPolygon &copy);
2929

30-
virtual EggPolygon *make_copy() const OVERRIDE;
30+
virtual EggPolygon *make_copy() const override;
3131

32-
virtual bool cleanup() OVERRIDE;
32+
virtual bool cleanup() override;
3333

3434
bool calculate_normal(LNormald &result, CoordinateSystem cs = CS_default) const;
3535
bool is_planar() const;
@@ -39,7 +39,7 @@ class EXPCL_PANDAEGG EggPolygon : public EggPrimitive {
3939
INLINE bool triangulate_into(EggGroupNode *container, bool convex_also) const;
4040
PT(EggPolygon) triangulate_in_place(bool convex_also);
4141

42-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
42+
virtual void write(ostream &out, int indent_level) const override;
4343

4444
private:
4545
bool decomp_concave(EggGroupNode *container, int asum, int x, int y) const;
@@ -55,10 +55,10 @@ class EXPCL_PANDAEGG EggPolygon : public EggPrimitive {
5555
register_type(_type_handle, "EggPolygon",
5656
EggPrimitive::get_class_type());
5757
}
58-
virtual TypeHandle get_type() const OVERRIDE {
58+
virtual TypeHandle get_type() const override {
5959
return get_class_type();
6060
}
61-
virtual TypeHandle force_init_type() OVERRIDE {
61+
virtual TypeHandle force_init_type() override {
6262
init_type();
6363
return get_class_type();
6464
}

panda/src/egg/eggTriangleFan.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive {
2929
INLINE EggTriangleFan &operator = (const EggTriangleFan &copy);
3030
virtual ~EggTriangleFan();
3131

32-
virtual EggTriangleFan *make_copy() const OVERRIDE;
32+
virtual EggTriangleFan *make_copy() const override;
3333

34-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
35-
virtual void apply_first_attribute() OVERRIDE;
34+
virtual void write(ostream &out, int indent_level) const override;
35+
virtual void apply_first_attribute() override;
3636

3737
protected:
38-
virtual int get_num_lead_vertices() const OVERRIDE;
39-
virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE;
38+
virtual int get_num_lead_vertices() const override;
39+
virtual bool do_triangulate(EggGroupNode *container) const override;
4040

4141
public:
4242
static TypeHandle get_class_type() {
@@ -47,10 +47,10 @@ class EXPCL_PANDAEGG EggTriangleFan : public EggCompositePrimitive {
4747
register_type(_type_handle, "EggTriangleFan",
4848
EggCompositePrimitive::get_class_type());
4949
}
50-
virtual TypeHandle get_type() const OVERRIDE {
50+
virtual TypeHandle get_type() const override {
5151
return get_class_type();
5252
}
53-
virtual TypeHandle force_init_type() OVERRIDE {
53+
virtual TypeHandle force_init_type() override {
5454
init_type();
5555
return get_class_type();
5656
}

panda/src/egg/eggTriangleStrip.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class EXPCL_PANDAEGG EggTriangleStrip : public EggCompositePrimitive {
2929
INLINE EggTriangleStrip &operator = (const EggTriangleStrip &copy);
3030
virtual ~EggTriangleStrip();
3131

32-
virtual EggTriangleStrip *make_copy() const OVERRIDE;
32+
virtual EggTriangleStrip *make_copy() const override;
3333

34-
virtual void write(ostream &out, int indent_level) const OVERRIDE;
34+
virtual void write(ostream &out, int indent_level) const override;
3535

3636
protected:
37-
virtual int get_num_lead_vertices() const OVERRIDE;
38-
virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE;
37+
virtual int get_num_lead_vertices() const override;
38+
virtual bool do_triangulate(EggGroupNode *container) const override;
3939

4040
public:
4141
static TypeHandle get_class_type() {
@@ -46,10 +46,10 @@ class EXPCL_PANDAEGG EggTriangleStrip : public EggCompositePrimitive {
4646
register_type(_type_handle, "EggTriangleStrip",
4747
EggCompositePrimitive::get_class_type());
4848
}
49-
virtual TypeHandle get_type() const OVERRIDE {
49+
virtual TypeHandle get_type() const override {
5050
return get_class_type();
5151
}
52-
virtual TypeHandle force_init_type() OVERRIDE {
52+
virtual TypeHandle force_init_type() override {
5353
init_type();
5454
return get_class_type();
5555
}

panda/src/glstuff/glCgShaderContext_src.I

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,3 @@
1010
* @author rdb
1111
* @date 2014-06-27
1212
*/
13-
14-
#ifndef OPENGLES_1
15-
16-
/**
17-
* Returns true if the shader is "valid", ie, if the compilation was
18-
* successful. The compilation could fail if there is a syntax error in the
19-
* shader, or if the current video card isn't shader-capable, or if no shader
20-
* languages are compiled into panda.
21-
*/
22-
INLINE bool CLP(CgShaderContext)::
23-
valid() {
24-
if (_shader->get_error_flag()) return false;
25-
if (_shader->get_language() != Shader::SL_Cg) return false;
26-
return (_cg_program != 0);
27-
}
28-
29-
/**
30-
* Returns true if the shader may need to access standard vertex attributes as
31-
* passed by glVertexPointer and the like.
32-
*/
33-
INLINE bool CLP(CgShaderContext)::
34-
uses_standard_vertex_arrays() {
35-
return false;
36-
}
37-
38-
/**
39-
* Always true, for now.
40-
*/
41-
INLINE bool CLP(CgShaderContext)::
42-
uses_custom_vertex_arrays() {
43-
return true;
44-
}
45-
46-
#endif // OPENGLES_1

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy