mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
Improve cast safety
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
parent
b3fdab28a2
commit
1315133b50
2 changed files with 3 additions and 3 deletions
|
@ -217,7 +217,7 @@ static std::ostream & showDebugTrace(std::ostream & out, const PosTable & positi
|
|||
// prefer direct pos, but if noPos then try the expr.
|
||||
auto pos = dt.pos
|
||||
? dt.pos
|
||||
: (std::shared_ptr<AbstractPos>) positions[dt.expr.getPos() ? dt.expr.getPos() : noPos];
|
||||
: static_cast<std::shared_ptr<AbstractPos>>(positions[dt.expr.getPos() ? dt.expr.getPos() : noPos]);
|
||||
|
||||
if (pos) {
|
||||
out << pos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue