mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
GCS: Get rid of some compiler warnings.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@906 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
694f7e7feb
commit
4b9f224674
@ -250,7 +250,7 @@ PQP_Model::MemUsage(int msg)
|
||||
|
||||
if (msg)
|
||||
{
|
||||
fprintf(stderr,"Total for model %x: %d bytes\n", this, total_mem);
|
||||
fprintf(stderr,"Total for model %p: %d bytes\n", this, total_mem);
|
||||
fprintf(stderr,"BVs: %d alloced, take %d bytes each\n",
|
||||
num_bvs, sizeof(BV));
|
||||
fprintf(stderr,"Tris: %d alloced, take %d bytes each\n",
|
||||
|
@ -58,7 +58,7 @@ static void
|
||||
lib3ds_chunk_debug_dump(Lib3dsChunk *c)
|
||||
{
|
||||
if (enable_dump) {
|
||||
printf("%s%s (0x%X) size=%lu\n",
|
||||
printf("%s%s (0x%X) size=%d\n",
|
||||
lib3ds_chunk_level,
|
||||
lib3ds_chunk_name(c->chunk),
|
||||
c->chunk,
|
||||
|
@ -1963,6 +1963,13 @@ file_bounding_box_of_nodes_impl(Lib3dsNode *node, Lib3dsFile *file, Lib3dsBool i
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case LIB3DS_UNKNOWN_NODE:
|
||||
case LIB3DS_AMBIENT_NODE:
|
||||
case LIB3DS_CAMERA_NODE:
|
||||
case LIB3DS_TARGET_NODE:
|
||||
case LIB3DS_LIGHT_NODE:
|
||||
case LIB3DS_SPOT_NODE:
|
||||
break;
|
||||
}
|
||||
{
|
||||
Lib3dsNode *p=node->childs;
|
||||
|
@ -30,7 +30,7 @@
|
||||
/*!
|
||||
* \defgroup light Lights
|
||||
*/
|
||||
/*!
|
||||
/*!*/
|
||||
|
||||
|
||||
/*!
|
||||
|
@ -568,7 +568,7 @@ lib3ds_mesh_dump(Lib3dsMesh *mesh)
|
||||
Lib3dsVector p;
|
||||
|
||||
ASSERT(mesh);
|
||||
printf(" %s vertices=%ld faces=%ld\n",
|
||||
printf(" %s vertices=%d faces=%d\n",
|
||||
mesh->name,
|
||||
mesh->points,
|
||||
mesh->faces
|
||||
|
@ -1548,5 +1548,7 @@ lib3ds_dump_tracks(Lib3dsNode *node)
|
||||
printf("pos: ");
|
||||
lib3ds_lin3Track_dump(&node->data.spot.pos_track);
|
||||
break;
|
||||
case LIB3DS_UNKNOWN_NODE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +380,7 @@ lib3ds_viewport_dump(Lib3dsViewport *vp)
|
||||
printf(" position: %d,%d\n",
|
||||
vp->layout.position[0], vp->layout.position[1]);
|
||||
printf(" size: %d,%d\n", vp->layout.size[0], vp->layout.size[1]);
|
||||
printf(" views: %ld\n", vp->layout.views);
|
||||
printf(" views: %d\n", vp->layout.views);
|
||||
if (vp->layout.views > 0 && vp->layout.viewL != NULL) {
|
||||
for(i=0, view=vp->layout.viewL; i < vp->layout.views; ++i, ++view) {
|
||||
printf(" view %d:\n", i);
|
||||
|
@ -221,7 +221,7 @@ void GLC_RepTrackBallMover::computeRadius()
|
||||
// Circle radius in OpenGL unit = Radius(Pixel) * (dimend GL / dimens Pixel)
|
||||
const double RayonSph= fabs((static_cast<double>(nRayonSph) * ChampsVision / winVSize));
|
||||
|
||||
if (not qFuzzyCompare(RayonSph, 0.0) and not qFuzzyCompare(RayonSph - m_Radius, 0.0) or (RayonSph < 2.0))
|
||||
if (((not qFuzzyCompare(RayonSph, 0.0)) and (not qFuzzyCompare(RayonSph - m_Radius, 0.0))) or (RayonSph < 2.0))
|
||||
{
|
||||
// Main circle radius
|
||||
m_MainCircle.setRadius(RayonSph);
|
||||
|
@ -51,7 +51,7 @@ namespace core {
|
||||
private:
|
||||
Cache();
|
||||
Cache(Cache const&){};
|
||||
Cache& operator=(Cache const&){};
|
||||
Cache& operator=(Cache const&){ return *this; };
|
||||
static Cache* m_pInstance;
|
||||
QString cache;
|
||||
QString routeCache;
|
||||
|
@ -37,7 +37,7 @@ namespace core {
|
||||
m_pInstance=new OPMaps;
|
||||
return m_pInstance;
|
||||
}
|
||||
OPMaps::OPMaps():useMemoryCache(true),MaxZoom(19),RetryLoadTile(2)
|
||||
OPMaps::OPMaps():MaxZoom(19),RetryLoadTile(2),useMemoryCache(true)
|
||||
{
|
||||
accessmode=AccessMode::ServerAndCache;
|
||||
Language=LanguageType::PortuguesePortugal;
|
||||
@ -194,14 +194,14 @@ namespace core {
|
||||
#endif //DEBUG_GMAPS
|
||||
QTime time;
|
||||
time.start();
|
||||
while( !(reply->isFinished() | time.elapsed()>(6*Timeout)) ){QCoreApplication::processEvents(QEventLoop::AllEvents);}
|
||||
while( !(reply->isFinished() || (time.elapsed()>(6*Timeout))) ){QCoreApplication::processEvents(QEventLoop::AllEvents);}
|
||||
#ifdef DEBUG_TIMINGS
|
||||
qDebug()<<"Network time:"<<time.elapsed();
|
||||
#endif
|
||||
#ifdef DEBUG_GMAPS
|
||||
qDebug()<<"Finished?"<<reply->error()<<" abort?"<<(time.elapsed()>Timeout*6);
|
||||
#endif //DEBUG_GMAPS
|
||||
if( (reply->error()!=QNetworkReply::NoError) | (time.elapsed()>Timeout*6))
|
||||
if( (reply->error()!=QNetworkReply::NoError) || (time.elapsed()>Timeout*6))
|
||||
{
|
||||
#ifdef DEBUG_GMAPS
|
||||
qDebug()<<"Request timed out ";//<<pos.x+","+pos.y;
|
||||
|
@ -78,7 +78,7 @@ namespace core {
|
||||
OPMaps();
|
||||
|
||||
OPMaps(OPMaps const&){};
|
||||
OPMaps& operator=(OPMaps const&){};
|
||||
OPMaps& operator=(OPMaps const&){ return *this; }
|
||||
static OPMaps* m_pInstance;
|
||||
|
||||
|
||||
|
@ -66,7 +66,7 @@ void RawTile::setZoom(const int &value)
|
||||
uint qHash(RawTile const& tile)
|
||||
{
|
||||
// RawTile tile=tilee;
|
||||
quint64 tmp=(((quint64)(tile.zoom))<<54)+(((int)(tile.type))<<36)+(((quint64)(tile.pos.X()))<<18)+(((quint64)(tile.pos.Y())));
|
||||
quint64 tmp=(((quint64)(tile.zoom))<<54)+(((quint64)(tile.type))<<36)+(((quint64)(tile.pos.X()))<<18)+(((quint64)(tile.pos.Y())));
|
||||
// quint64 tmp5=tmp+tmp2+tmp3+tmp4;
|
||||
return ::qHash(tmp);
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ qlonglong internals::Core::debugcounter=0;
|
||||
using namespace projections;
|
||||
|
||||
namespace internals {
|
||||
Core::Core():currentPosition(0,0),currentPositionPixel(0,0),LastLocationInBounds(-1,-1),sizeOfMapArea(0,0)
|
||||
,minOfTiles(0,0),maxOfTiles(0,0),isDragging(false),started(false),MouseWheelZooming(false),TooltipTextPadding(10,10),zoom(0),loaderLimit(5)
|
||||
Core::Core():MouseWheelZooming(false),currentPosition(0,0),currentPositionPixel(0,0),LastLocationInBounds(-1,-1),sizeOfMapArea(0,0)
|
||||
,minOfTiles(0,0),maxOfTiles(0,0),zoom(0),isDragging(false),TooltipTextPadding(10,10),loaderLimit(5),started(false)
|
||||
{
|
||||
mousewheelzoomtype=MouseWheelZoomType::MousePositionAndCenter;
|
||||
SetProjection(new MercatorProjection());
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
namespace projections {
|
||||
MercatorProjectionYandex::MercatorProjectionYandex():MinLatitude(-85.05112878), MaxLatitude(85.05112878),MinLongitude(-177),
|
||||
MaxLongitude(177), tileSize(256, 256),RAD_DEG(180 / M_PI),DEG_RAD(M_PI / 180), MathPiDiv4(M_PI / 4)
|
||||
MaxLongitude(177), RAD_DEG(180 / M_PI),DEG_RAD(M_PI / 180),MathPiDiv4(M_PI / 4),tileSize(256, 256)
|
||||
{
|
||||
}
|
||||
Point MercatorProjectionYandex::FromLatLngToPixel(double lat, double lng, const int &zoom)
|
||||
|
@ -17,6 +17,7 @@ class MapGraphicItem:public QObject,public QGraphicsItem
|
||||
{
|
||||
friend class mapcontrol::OPMapWidget;
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
public:
|
||||
MapGraphicItem(internals::Core *core,Configuration *configuration);
|
||||
QRectF boundingRect() const;
|
||||
|
@ -217,7 +217,7 @@ void QwtDoubleRange::setStep(double vstep)
|
||||
newStep = intv * DefaultRelStep;
|
||||
else
|
||||
{
|
||||
if ((intv > 0) && (vstep < 0) || (intv < 0) && (vstep > 0))
|
||||
if (((intv > 0) && (vstep < 0)) || ((intv < 0) && (vstep > 0)))
|
||||
newStep = -vstep;
|
||||
else
|
||||
newStep = vstep;
|
||||
|
@ -49,6 +49,7 @@ namespace Ui {
|
||||
class WaypointItem : public QObject, public QGraphicsItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QGraphicsItem)
|
||||
|
||||
public:
|
||||
WaypointItem(QString name = "", double latitude = 0, double longitude = 0, double height_feet = 0, int time_seconds = 0, int hold_seconds = 0);
|
||||
|
@ -156,8 +156,8 @@ int pjrc_rawhid::open(int max, int vid, int pid, int usage_page, int usage)
|
||||
if (parsed_usage_page && parsed_usage) break;
|
||||
}
|
||||
if ((!parsed_usage_page) || (!parsed_usage) ||
|
||||
(usage_page > 0 && parsed_usage_page != usage_page) ||
|
||||
(usage > 0 && parsed_usage != usage)) {
|
||||
(usage_page > 0 && parsed_usage_page != (uint32_t)usage_page) ||
|
||||
(usage > 0 && parsed_usage != (uint32_t)usage)) {
|
||||
usb_release_interface(u, i);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user