Hi all:
Recently, I got this warning "cppcheck: warning: noConstructor:extension/ca/cti/service/TSmartCardAdaptee.h:15: The class 'TSmartCardAdaptee' does not have a constructor." and the cppcheck is 1.68
and the sample code is :
#include "base/Singleton.h"
include <iostream></iostream>
include <fstream></fstream>
class TNvRamAdaptee
{
DEF_SINGLETON(TNvRamAdaptee);
Hi all:
Recently, I got this warning "cppcheck: warning: noConstructor:extension/ca/cti/service/TSmartCardAdaptee.h:15: The class 'TSmartCardAdaptee' does not have a constructor." and the cppcheck is 1.68
and the sample code is :
#include "base/Singleton.h"
include <iostream></iostream>
include <fstream></fstream>
class TNvRamAdaptee
{
DEF_SINGLETON(TNvRamAdaptee);
private:
std::fstream DbFile;
public:
void Init(std::string file, int DbFileSize);
uint16_t Write(uint8_t data, uint16_t len, uint16_t position);
uint16_t Read(uint8_t data, uint16_t len, uint16_t position);
};
and the Singleton.h is :
#define DEF_SINGLETON(T) \
public: \
static T& GetInstance() \
{ \
static T Instance; \
return Instance; \
} \
private: \
T() { /* empty. /} \
NON_COPYABLE(T)
endif
Last edit: Andy.Yin 2015-04-01
please report bugs here: http://trac.cppcheck.net