]> www.ginac.de Git - ginac.git/blobdiff - ginac/color.h
Make ample use of the contextual keyword 'override'.
[ginac.git] / ginac / color.h
index 460e7a9ddaded2be8117e3a302caeb428ea3a22f..448a81edcd7b30bfeb8aed37b0cb2f7fdba419a8 100644 (file)
@@ -48,17 +48,17 @@ public:
        // internal constructors
        color(unsigned char rl, const exvector & v);
        color(unsigned char rl, exvector && v);
-       void archive(archive_node& n) const;
-       void read_archive(const archive_node& n, lst& sym_lst);
+       void archive(archive_node& n) const override;
+       void read_archive(const archive_node& n, lst& sym_lst) override;
 
        // functions overriding virtual functions from base classes
 protected:
-       ex eval_ncmul(const exvector & v) const;
-       bool match_same_type(const basic & other) const;
-       ex thiscontainer(const exvector & v) const;
-       ex thiscontainer(exvector && v) const;
-       unsigned return_type() const { return return_types::noncommutative; }
-       return_type_t return_type_tinfo() const;
+       ex eval_ncmul(const exvector & v) const override;
+       bool match_same_type(const basic & other) const override;
+       ex thiscontainer(const exvector & v) const override;
+       ex thiscontainer(exvector && v) const override;
+       unsigned return_type() const override { return return_types::noncommutative; }
+       return_type_t return_type_tinfo() const override;
 
        // non-virtual functions in this class
 public:
@@ -90,7 +90,7 @@ class su3t : public tensor
 
        // functions overriding virtual functions from base classes
 public:
-       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
+       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override;
 
        // non-virtual functions in this class
 protected:
@@ -107,12 +107,13 @@ class su3f : public tensor
 
        // functions overriding virtual functions from base classes
 public:
-       ex eval_indexed(const basic & i) const;
-       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
+       ex eval_indexed(const basic & i) const override;
+       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override;
+protected:
+       unsigned return_type() const override { return return_types::commutative; }
 
        // non-virtual functions in this class
 protected:
-       unsigned return_type() const { return return_types::commutative; }
        void do_print(const print_context & c, unsigned level) const;
        void do_print_latex(const print_latex & c, unsigned level) const;
 };
@@ -125,12 +126,13 @@ class su3d : public tensor
 
        // functions overriding virtual functions from base classes
 public:
-       ex eval_indexed(const basic & i) const;
-       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
+       ex eval_indexed(const basic & i) const override;
+       bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const override;
+protected:
+       unsigned return_type() const override { return return_types::commutative; }
 
        // non-virtual functions in this class
 protected:
-       unsigned return_type() const { return return_types::commutative; }
        void do_print(const print_context & c, unsigned level) const;
        void do_print_latex(const print_latex & c, unsigned level) const;
 };