Skip to content

Commit

Permalink
Merge pull request #1515 from Framstag/fix_some_meson_build_warnings
Browse files Browse the repository at this point in the history
Fixed some meson OS X build warnings
  • Loading branch information
Framstag authored Oct 6, 2023
2 parents 0c2dcd8 + 41f0509 commit 09d3f91
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 15 deletions.
2 changes: 0 additions & 2 deletions Demos/src/NavigationSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions Tests/src/PerformanceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<args.loadRepeat; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ namespace osmscout {
const TypeData& typeData,
const CoordOffsetsMap& typeCellOffsets)
{
size_t indexEntries=0;
size_t dataSize=0;
std::array<char,10> buffer;

Expand All @@ -157,8 +156,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);

Expand Down
8 changes: 3 additions & 5 deletions libosmscout-map-iosx/src/osmscout/MapPainterIOS.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
3 changes: 1 addition & 2 deletions libosmscout/src/osmscout/util/SunriseSunset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -338,4 +337,4 @@ namespace {
return GetSunriseSunset(location, day, SUN_ALTITUDE_SUNRISE_SUNSET);
}

}
}

0 comments on commit 09d3f91

Please sign in to comment.