mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Use dynamic_cast instead of static_cast to downcast from a base to a derived class
This commit is contained in:
parent
04adb50480
commit
747d560630
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ void Database::initializeTagDatabase ()
|
|||
{
|
||||
throw format ("Failed to find \"count\" member for tag \"{1}\" in tags database. Database corrupted?", key);
|
||||
}
|
||||
auto number = static_cast<json::number *> (iter->second);
|
||||
auto number = dynamic_cast<json::number *> (iter->second);
|
||||
_tagInfoDatabase.add (key, TagInfo {(unsigned int) number->_dvalue});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue