Fixed GCC warnings.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-02 08:37:31 +03:00
parent ad7928248c
commit c65f554a8d
7 changed files with 43 additions and 101 deletions

View File

@ -365,7 +365,7 @@ public:
} }
private: private:
Q_DISABLE_COPY(DL_CreationInterface); Q_DISABLE_COPY(DL_CreationInterface)
protected: protected:
DL_Extrusion *extrusion; DL_Extrusion *extrusion;

View File

@ -457,7 +457,7 @@ public:
} }
private: private:
Q_DISABLE_COPY(DL_Dxf); Q_DISABLE_COPY(DL_Dxf)
DL_Codes::version version; DL_Codes::version version;
std::string polylineLayer; std::string polylineLayer;

View File

@ -30,6 +30,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <QtGlobal>
/** /**
* Layer Data. * Layer Data.
@ -125,7 +126,7 @@ struct DXFLIB_EXPORT DL_LinetypeData
double* pattern; double* pattern;
private: private:
Q_DISABLE_COPY(DL_LinetypeData); Q_DISABLE_COPY(DL_LinetypeData)
}; };
@ -839,6 +840,8 @@ struct DXFLIB_EXPORT DL_TextData
{ {
} }
virtual ~DL_TextData(){}
/*! X Coordinate of insertion point. */ /*! X Coordinate of insertion point. */
double ipx; double ipx;
/*! Y Coordinate of insertion point. */ /*! Y Coordinate of insertion point. */

View File

@ -1,58 +0,0 @@
/****************************************************************************
** Copyright (C) 2001-2013 RibbonSoft, GmbH. All rights reserved.
** Copyright (C) 2001 Robert J. Campbell Jr.
**
** This file is part of the dxflib project.
**
** This file is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** Licensees holding valid dxflib Professional Edition licenses may use
** this file in accordance with the dxflib Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.ribbonsoft.com for further details.
**
** Contact info@ribbonsoft.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef DL_EXCEPTION_H
#define DL_EXCEPTION_H
#include "dl_global.h"
#if defined(Q_CC_MSVC)
#if (_MSC_VER > 1000)
#pragma once
#endif // _MSC_VER > 1000
#endif // Q_CC_MSVC
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_Exception {}
;
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_NullStrExc : public DL_Exception {}
;
/**
* Used for exception handling.
*/
class DXFLIB_EXPORT DL_GroupCodeExc : public DL_Exception
{
DL_GroupCodeExc(int gc=0) : groupCode(gc) {}
int groupCode;
};
#endif

View File

@ -33,8 +33,6 @@
#include <string.h> #include <string.h>
#include "dl_writer_ascii.h" #include "dl_writer_ascii.h"
#include "dl_exception.h"
/** /**
* Closes the output file. * Closes the output file.
@ -133,12 +131,6 @@ void DL_WriterA::dxfHex(int gc, int value) const
*/ */
void DL_WriterA::dxfString(int gc, const char* value) const void DL_WriterA::dxfString(int gc, const char* value) const
{ {
if (value==NULL)
{
#ifndef __GCC2x__
//throw DL_NullStrExc();
#endif
}
m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n" m_ofile << (gc<10 ? " " : (gc<100 ? " " : "")) << gc << "\n"
<< value << "\n"; << value << "\n";
} }

View File

@ -16,7 +16,6 @@ HEADERS += \
$$PWD/dxflib/dl_creationinterface.h \ $$PWD/dxflib/dl_creationinterface.h \
$$PWD/dxflib/dl_dxf.h \ $$PWD/dxflib/dl_dxf.h \
$$PWD/dxflib/dl_entities.h \ $$PWD/dxflib/dl_entities.h \
$$PWD/dxflib/dl_exception.h \
$$PWD/dxflib/dl_extrusion.h \ $$PWD/dxflib/dl_extrusion.h \
$$PWD/dxflib/dl_global.h \ $$PWD/dxflib/dl_global.h \
$$PWD/dxflib/dl_writer.h \ $$PWD/dxflib/dl_writer.h \

View File

@ -54,8 +54,14 @@ static inline QPaintEngine::PaintEngineFeatures svgEngineFeatures()
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VDxfEngine::VDxfEngine() VDxfEngine::VDxfEngine()
:QPaintEngine(svgEngineFeatures()), :QPaintEngine(svgEngineFeatures()),
size(), resolution(PrintDPI), fileName(), matrix(), dxf(nullptr), dw(nullptr), size(),
varMeasurement(VarMeasurement::Metric), varInsunits(VarInsunits::Centimeters) resolution(static_cast<int>(PrintDPI)),
fileName(),
matrix(),
dxf(nullptr),
dw(nullptr),
varMeasurement(VarMeasurement::Metric),
varInsunits(VarInsunits::Centimeters)
{ {
} }