Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some meson OS X build warnings #1515

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -146,7 +146,6 @@ namespace osmscout {
const TypeData& typeData,
const CoordOffsetsMap& typeCellOffsets)
{
size_t indexEntries=0;
size_t dataSize=0;
std::array<char,10> buffer;

Expand All @@ -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);

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);
}

}
}