aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-12-13 12:38:33 +0100
committerGitHub <noreply@github.com>2022-12-13 12:38:33 +0100
commit1315133b50fd836f5b8bafc8bf63c85aef475a04 (patch)
treeeee18fc184e8eef0a876d3a9ed8a06d2c6634009 /src/libcmd
parentb3fdab28a216683365f7f04bfa9bbc5cd122d753 (diff)
Improve cast safety
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/repl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc
index 254c14d28..5400fcd69 100644
--- a/src/libcmd/repl.cc
+++ b/src/libcmd/repl.cc
@@ -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;