Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
KAlgebra
Commits
6e6ce22b
Commit
6e6ce22b
authored
Jun 19, 2022
by
Marius Pa
Committed by
Albert Astals Cid
Aug 06, 2022
Browse files
Fix issue "PVS-Studio V560 A part of conditional expression is always true: !hasImports."
parent
0c742658
Pipeline
#213794
passed with stage
in 41 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
calgebra/main.cpp
View file @
6e6ce22b
...
...
@@ -72,7 +72,6 @@ int main(int argc, char *argv[])
{
configuration
.
calcType
=
Evaluate
;
configuration
.
showElapsedType
=
false
;
bool
hasImports
=
false
;
for
(
int
i
=
1
;
i
<
argc
;
++
i
)
{
QByteArray
arg
=
argv
[
i
];
...
...
@@ -92,7 +91,6 @@ int main(int argc, char *argv[])
qDebug
()
<<
"
\t
...
\t\t
files that will be executed first"
;
return
0
;
}
else
{
// hasImports = true;
QFile
f
(
arg
);
if
(
!
f
.
open
(
QIODevice
::
ReadOnly
))
{
qWarning
()
<<
"File not found: "
<<
arg
;
...
...
@@ -116,7 +114,7 @@ int main(int argc, char *argv[])
using_history
();
QString
entry
;
while
(
!
done
&&
!
hasImports
)
{
while
(
!
done
)
{
char
*
expr
;
if
(
inside
)
expr
=
readline
(
insidePrompt
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment