Skip to content

Commit

Permalink
gui: Do not init std::any item var if we intend to use has_value() on…
Browse files Browse the repository at this point in the history
… it.

The var should no be inited otherwise has_value() will always be true.
That way the condition of the if will decide if the var has been set or
not.

Fixes warning:
    [WARNING GUI-0033] No descriptor is registered for Dn.
and now
    [WARNING GUI-0033] No descriptor is registered for type
decltype(nullptr).

Caused by frFakeVSS and frFakeGND:
    [WARNING GUI-0044] Unable to find net (line: 104375): frFakeVSS
    [WARNING GUI-0044] Unable to find net (line: 104378): frFakeVDD

Signed-off-by: Christian Costa <[email protected]>
  • Loading branch information
titan73 committed Aug 19, 2024
1 parent c0d8a10 commit 85927f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/src/drcWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ void DRCWidget::loadTRReport(const QString& filename)
std::string item_type = single_source.substr(0, ident);
std::string item_name = single_source.substr(ident + 1);

std::any item = nullptr;
std::any item;

if (item_type == "net") {
odb::dbNet* net = block_->findNet(item_name.c_str());
Expand Down

0 comments on commit 85927f3

Please sign in to comment.