From: omy Date: Fri, 1 Feb 2013 11:39:38 +0000 (+0400) Subject: 0023267: cppcheck warning: Using 'memcpy' on class that contains a virtual method X-Git-Tag: V6_6_0_beta~101 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9254e07c59276e4305d82364ab60eb0f4c0e7bb0;p=occt-copy.git 0023267: cppcheck warning: Using 'memcpy' on class that contains a virtual method Removed class _BaseElement, thus _Element's functions are not virtual now. Removed redundant Msg() function from _Element class. --- diff --git a/src/MMgt/MMgt_StackManager.cxx b/src/MMgt/MMgt_StackManager.cxx index 827e44d9fc..a19d589f4f 100755 --- a/src/MMgt/MMgt_StackManager.cxx +++ b/src/MMgt/MMgt_StackManager.cxx @@ -33,43 +33,13 @@ #define SHALLOWDUMP #endif -//============================================================================ -//==== There are two declaration of classes just for protections ============= -//============================================================================ - -class _BaseElement { - public: - virtual void M1() =0; - virtual void M2() =0; - virtual void M3() =0; - virtual void M4() =0; - virtual void M5() =0; - virtual void M6() =0; - virtual void M7() =0; - virtual void M8() =0; - virtual void M9() =0; - virtual void M10()=0; -}; - -static class _Element: public _BaseElement +static class _Element { public: _Element() {}; - void Msg() - {Standard_ProgramError::Raise("Attempt to access to a 'deleted' object");} - void M1() {Msg();} - void M2() {Msg();} - void M3() {Msg();} - void M4() {Msg();} - void M5() {Msg();} - void M6() {Msg();} - void M7() {Msg();} - void M8() {Msg();} - void M9() {Msg();} - void M10(){Msg();} - + Standard_Address myNext; - + } *anElement = new _Element; //============================================================================