From 41f0509af209c50936809d59f746b9cb7aef074d Mon Sep 17 00:00:00 2001 From: Tim Teulings Date: Tue, 3 Oct 2023 13:18:23 +0200 Subject: [PATCH] Fixed some meson OS X build warnings (Clion EAP now supports meson) --- Demos/src/NavigationSimulator.cpp | 2 -- Tests/src/PerformanceTest.cpp | 2 -- .../include/osmscoutimport/AreaIndexGenerator.h | 3 --- libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm | 8 +++----- .../src/osmscoutmapopengl/MapPainterOpenGL.cpp | 1 - libosmscout/src/osmscout/util/SunriseSunset.cpp | 3 +-- 6 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Demos/src/NavigationSimulator.cpp b/Demos/src/NavigationSimulator.cpp index bedb4f110..46e161ed2 100644 --- a/Demos/src/NavigationSimulator.cpp +++ b/Demos/src/NavigationSimulator.cpp @@ -162,7 +162,6 @@ PathGenerator::PathGenerator(const osmscout::RouteDescription& description, double maxSpeed) { size_t tickCount=0; - double totalTime=0.0; double restTime=0.0; auto currentNode=description.Nodes().begin(); auto nextNode=currentNode; @@ -204,7 +203,6 @@ PathGenerator::PathGenerator(const osmscout::RouteDescription& description, auto timeInHours=distanceInKilometer/maxSpeed; auto timeInSeconds=timeInHours*60*60; - totalTime+=timeInHours; // Make sure we do not skip edges in the street lastPosition=currentNode->GetLocation(); diff --git a/Tests/src/PerformanceTest.cpp b/Tests/src/PerformanceTest.cpp index ce7d7670d..2a0d6759d 100644 --- a/Tests/src/PerformanceTest.cpp +++ b/Tests/src/PerformanceTest.cpp @@ -857,8 +857,6 @@ int main(int argc, char* argv[]) args.TileWidth(), args.TileHeight()); - osmscout::GeoBox boundingBox(projection.GetDimensions()); - projection.SetLinearInterpolationUsage(level.Get() >= 10); for (size_t i=0; i buffer; @@ -156,8 +155,6 @@ namespace osmscout { // that much bytes we need to address the last data entry. for (const auto& cell : typeCellOffsets) { - indexEntries+=cell.second.size(); - dataSize+=EncodeNumber(cell.second.size(), buffer); diff --git a/libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm b/libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm index 30fb225c2..e117c8a2a 100644 --- a/libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm +++ b/libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm @@ -445,7 +445,7 @@ static void DrawPattern (void * info,CGContextRef cg){ int lineNumber = 0; for (CTRunRef run : layout.run) { const CTFontRef font = (CTFontRef)CFDictionaryGetValue(CTRunGetAttributes(run), kCTFontAttributeName); - CFIndex glyphCount = CTRunGetGlyphCount(run); + const CFIndex glyphCount = CTRunGetGlyphCount(run); CGGlyph glyphs[glyphCount]; CGPoint glyphPositions[glyphCount]; CGSize glyphAdvances[glyphCount]; @@ -627,11 +627,9 @@ static void DrawPattern (void * info,CGContextRef cg){ const MapParameter& /* parameter */, const Symbol& symbol, const ContourSymbolData& data){ - CGContextRef drawCG = cg; SymbolRendererIOS renderer(cg); ScreenBox boundingBox=symbol.GetBoundingBox(projection); double width=boundingBox.GetWidth(); - double height=boundingBox.GetHeight(); bool isClosed = false; CGAffineTransform transform=CGAffineTransformMake(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); Vertex2D origin; @@ -642,7 +640,7 @@ static void DrawPattern (void * info,CGContextRef cg){ if(!isClosed && !followPath(followPathHnd, data.symbolOffset, origin)){ return; } - + bool loop = true; while (loop){ x1 = origin.GetX(); @@ -712,7 +710,7 @@ static void DrawPattern (void * info,CGContextRef cg){ const Symbol& symbol, const Vertex2D& screenPos, double scaleFactor) { - + SymbolRendererIOS renderer(cg); renderer.Render(projection, diff --git a/libosmscout-map-opengl/src/osmscoutmapopengl/MapPainterOpenGL.cpp b/libosmscout-map-opengl/src/osmscoutmapopengl/MapPainterOpenGL.cpp index 0a1aa4fd3..d83501c54 100644 --- a/libosmscout-map-opengl/src/osmscoutmapopengl/MapPainterOpenGL.cpp +++ b/libosmscout-map-opengl/src/osmscoutmapopengl/MapPainterOpenGL.cpp @@ -415,7 +415,6 @@ namespace osmscout { double yMin = std::min(minPixel.GetY(), maxPixel.GetY()) - pixelOffset; double yMax = std::max(minPixel.GetY(), maxPixel.GetY()) + pixelOffset; - osmscout::GeoBox gb(projection.GetDimensions()); double areaMinDimension = projection.ConvertWidthToPixel(parameter.GetAreaMinDimensionMM()); if (xMax - xMin <= areaMinDimension && diff --git a/libosmscout/src/osmscout/util/SunriseSunset.cpp b/libosmscout/src/osmscout/util/SunriseSunset.cpp index 8a639d3f5..8f100f6b7 100644 --- a/libosmscout/src/osmscout/util/SunriseSunset.cpp +++ b/libosmscout/src/osmscout/util/SunriseSunset.cpp @@ -50,7 +50,6 @@ namespace { const int JULIAN_DATE_2000_01_01 = 2451545; const double CONST_0009 = 0.0009; const double CONST_360 = 360; - const long MILLISECONDS_IN_DAY = 60 * 60 * 24 * 1000; /** * Intermediate variables used in the sunrise equation @@ -338,4 +337,4 @@ namespace { return GetSunriseSunset(location, day, SUN_ALTITUDE_SUNRISE_SUNSET); } -} \ No newline at end of file +}