The related procedure code is provided below.I often see such kind of code in open source projects which can run both on Linux and Windows. Somebody told me that it is to avoid compiling warning. Is it really the case?
class Base
{
public:
virtual void on_publication_matched(Publisher* pub, PublicationMatchedStatus& info)
{
(void)pub;
(void)info;
}
};
I wonder why not define it like this:
class Base
{
public:
virtual void on_publication_matched(Publisher* pub, PublicationMatchedStatus& info){};
};
or
class Base
{
public:
virtual void on_publication_matched(Publisher* pub, PublicationMatchedStatus& info) = 0;
};