[GIT] ppl/ppl(master): Specify the `virtual' keyword when declaring overriding methods.

Module: ppl/ppl Branch: master Commit: 1a28c03f8b5cc431553f06385c8124acfc9ab4e1 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=1a28c03f8b5cc...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Wed Feb 22 08:38:08 2012 +0100
Specify the `virtual' keyword when declaring overriding methods. Detected by ECLAIR service ovrdexpl.
---
src/Handler.defs.hh | 10 ++++++---- src/c_streambuf.defs.hh | 14 +++++++------- 2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/src/Handler.defs.hh b/src/Handler.defs.hh index 6914b09..5a0e400 100644 --- a/src/Handler.defs.hh +++ b/src/Handler.defs.hh @@ -63,9 +63,11 @@ public: //! Constructor with a given function. Handler_Flag(const Flag_Base* volatile& holder, Flag& flag);
- //! Does its job: installs the flag onto the holder, if a flag with - //! an higher priority has not already been installed. - void act() const; + /*! \brief + Does its job: installs the flag onto the holder, if a flag with + an higher priority has not already been installed. + */ + virtual void act() const;
private: // declare holder as reference to volatile pointer to const Flag_Base @@ -81,7 +83,7 @@ public: Handler_Function(void (*function)());
//! Does its job: calls the embedded function. - void act() const; + virtual void act() const;
private: //! Pointer to the embedded function. diff --git a/src/c_streambuf.defs.hh b/src/c_streambuf.defs.hh index 1ed401b..b8e0d98 100644 --- a/src/c_streambuf.defs.hh +++ b/src/c_streambuf.defs.hh @@ -43,7 +43,7 @@ protected: \remarks Specified by ISO/IEC 14882:1998: 27.5.2.4.3. */ - int_type underflow(); + virtual int_type underflow();
/*! \brief In case of underflow, gets a character and advances the next pointer. @@ -51,7 +51,7 @@ protected: \remarks Specified by ISO/IEC 14882:1998: 27.5.2.4.3. */ - int_type uflow(); + virtual int_type uflow();
/*! \brief Gets a sequence of characters. @@ -59,7 +59,7 @@ protected: \remarks Specified by ISO/IEC 14882:1998: 27.5.2.4.3. */ - std::streamsize xsgetn(char_type* s, std::streamsize n); + virtual std::streamsize xsgetn(char_type* s, std::streamsize n);
/*! \brief Puts character back in case of backup underflow. @@ -67,7 +67,7 @@ protected: \remarks Specified by ISO/IEC 14882:1998: 27.5.2.4.4. */ - int_type pbackfail(int_type c = traits_type::eof()); + virtual int_type pbackfail(int_type c = traits_type::eof());
/*! \brief Writes a sequence of characters. @@ -75,21 +75,21 @@ protected: \remarks Specified by ISO/IEC 14882:1998: 27.5.2.4.5. */ - std::streamsize xsputn(const char_type* s, std::streamsize n); + virtual std::streamsize xsputn(const char_type* s, std::streamsize n);
/*! \brief Writes a character in case of overflow.
Specified by ISO/IEC 14882:1998: 27.5.2.4.5. */ - int_type overflow(int_type c); + virtual int_type overflow(int_type c);
/*! \brief Synchronizes the stream buffer.
Specified by ISO/IEC 14882:1998: 27.5.2.4.2. */ - int sync(); + virtual int sync();
private: //! Character type of the streambuf.
participants (1)
-
Enea Zaffanella