Fixed compilation warnings
Mostly, by making base class destructors virtual.
This commit is contained in:
parent
74ca5511d7
commit
448a70f889
9 changed files with 13 additions and 11 deletions
|
@ -55,6 +55,7 @@ public:
|
|||
class HyperlinkMatcher {
|
||||
|
||||
public:
|
||||
virtual ~HyperlinkMatcher() {}
|
||||
virtual Label match(const std::map<std::string,Label> &lMap, const std::string &id) const = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ shared_ptr<Book> BooksDB::loadBook(const std::string &fileName) {
|
|||
|
||||
myFindFileId->setFileName(fileName);
|
||||
if (!myFindFileId->run()) {
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
((DBIntValue&)*myLoadBook->parameter("@file_id").value()) = myFindFileId->fileId();
|
||||
shared_ptr<DBDataReader> reader = myLoadBook->executeReader();
|
||||
|
|
|
@ -95,7 +95,6 @@ void PlainTextFormatDetector::detect(ZLInputStream &stream, PlainTextFormat &for
|
|||
|
||||
char *buffer = new char[BUFFER_SIZE];
|
||||
int length;
|
||||
char previous = 0;
|
||||
do {
|
||||
length = stream.read(buffer, BUFFER_SIZE);
|
||||
const char *end = buffer + length;
|
||||
|
@ -135,7 +134,6 @@ void PlainTextFormatDetector::detect(ZLInputStream &stream, PlainTextFormat &for
|
|||
} else {
|
||||
currentLineIsEmpty = false;
|
||||
}
|
||||
previous = *ptr;
|
||||
}
|
||||
} while (length == BUFFER_SIZE);
|
||||
delete[] buffer;
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
public:
|
||||
BookReference(const std::string &url, Format format, Type type);
|
||||
virtual ~BookReference() {}
|
||||
|
||||
public:
|
||||
const std::string URL;
|
||||
|
|
|
@ -45,7 +45,7 @@ class ZLApplicationBase {
|
|||
|
||||
protected:
|
||||
ZLApplicationBase(const std::string &name);
|
||||
~ZLApplicationBase();
|
||||
virtual ~ZLApplicationBase();
|
||||
};
|
||||
|
||||
class ZLApplication : public ZLApplicationBase {
|
||||
|
|
|
@ -27,6 +27,8 @@ class ZLFile;
|
|||
class ZLOpenFileDialog {
|
||||
|
||||
public:
|
||||
virtual ~ZLOpenFileDialog() {}
|
||||
|
||||
class Filter {
|
||||
|
||||
public:
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
#include "ZLZDecompressor.h"
|
||||
#include "../ZLInputStream.h"
|
||||
|
||||
const int ZLZipHeader::SignatureLocalFile = 0x04034B50;
|
||||
const int ZLZipHeader::SignatureData = 0x08074B50;
|
||||
const unsigned long ZLZipHeader::SignatureLocalFile = 0x04034B50;
|
||||
const unsigned long ZLZipHeader::SignatureData = 0x08074B50;
|
||||
|
||||
bool ZLZipHeader::readFrom(ZLInputStream &stream) {
|
||||
size_t startOffset = stream.offset();
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
class ZLInputStream;
|
||||
|
||||
struct ZLZipHeader {
|
||||
static const int SignatureLocalFile;
|
||||
static const int SignatureData;
|
||||
static const unsigned long SignatureLocalFile;
|
||||
static const unsigned long SignatureData;
|
||||
|
||||
unsigned long Signature;
|
||||
unsigned short Version;
|
||||
|
|
|
@ -38,9 +38,9 @@ void ZLMapBasedStatisticsItem::next() {
|
|||
|
||||
ZLArrayBasedStatisticsItem::ZLArrayBasedStatisticsItem(size_t sequenceLength, char* sequencePtr, unsigned short* frequencyPtr, size_t index) :
|
||||
ZLStatisticsItem(index),
|
||||
mySequenceLength(sequenceLength),
|
||||
mySequencePtr(sequencePtr),
|
||||
myFrequencyPtr(frequencyPtr) {
|
||||
myFrequencyPtr(frequencyPtr),
|
||||
mySequenceLength(sequenceLength) {
|
||||
}
|
||||
|
||||
ZLCharSequence ZLArrayBasedStatisticsItem::sequence() const {
|
||||
|
|
Loading…
Reference in a new issue