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