supress warning
This commit is contained in:
parent
31a61b3000
commit
66f4641fb7
@ -42,9 +42,13 @@ namespace OpenStreetMap_Importer
|
|||||||
}
|
}
|
||||||
else if (reader.Name == "tag" && wayTag)
|
else if (reader.Name == "tag" && wayTag)
|
||||||
{
|
{
|
||||||
string? value = reader.GetAttribute("v");
|
#pragma warning disable CS8600 //tags will always have a value and key
|
||||||
string? key = reader.GetAttribute("k");
|
#pragma warning disable CS8604
|
||||||
|
string value = reader.GetAttribute("v");
|
||||||
|
string key = reader.GetAttribute("k");
|
||||||
logger.Log(loglevel.VERBOSE, "TAG {0} {1}", key, value);
|
logger.Log(loglevel.VERBOSE, "TAG {0} {1}", key, value);
|
||||||
|
#pragma warning restore CS8600
|
||||||
|
#pragma warning restore CS8604
|
||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case "highway":
|
case "highway":
|
||||||
@ -98,8 +102,10 @@ namespace OpenStreetMap_Importer
|
|||||||
ulong id = Convert.ToUInt64(reader.GetAttribute("id"));
|
ulong id = Convert.ToUInt64(reader.GetAttribute("id"));
|
||||||
if (nodes.ContainsKey(id))
|
if (nodes.ContainsKey(id))
|
||||||
{
|
{
|
||||||
|
#pragma warning disable CS8602 //node will always have a lat and lon
|
||||||
float lat = Convert.ToSingle(reader.GetAttribute("lat").Replace('.', ','));
|
float lat = Convert.ToSingle(reader.GetAttribute("lat").Replace('.', ','));
|
||||||
float lon = Convert.ToSingle(reader.GetAttribute("lon").Replace('.', ','));
|
float lon = Convert.ToSingle(reader.GetAttribute("lon").Replace('.', ','));
|
||||||
|
#pragma warning restore CS8602
|
||||||
nodes[id] = new Node(lat, lon);
|
nodes[id] = new Node(lat, lon);
|
||||||
logger.Log(loglevel.VERBOSE, "NODE {0} {1} {2}", id, lat, lon);
|
logger.Log(loglevel.VERBOSE, "NODE {0} {1} {2}", id, lat, lon);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user