Skip to content

Commit 7361eea

Browse files
committed
use isgreater
Signed-off-by: Rosen Penev <[email protected]>
1 parent b3ef14e commit 7361eea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/matroskavideo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ void MatroskaVideo::decodeFloatTags(const MatroskaTag* tag, const byte* buf) {
883883
default:
884884
break;
885885
}
886-
if (frame_rate > 0.0)
886+
if (std::isgreater(frame_rate, 0.0))
887887
xmpData_[internalMt->_label] = frame_rate;
888888
} else
889889
xmpData_[tag->_label] = "Variable Bit Rate";

src/tags_int.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,7 +2738,8 @@ std::ostream& printLensSpecification(std::ostream& os, const Value& value, const
27382738
fNumber2 = value.toFloat(3);
27392739

27402740
// first value must not be bigger than second
2741-
if ((focalLength1 > focalLength2 && focalLength2 > 0.0f) || (fNumber1 > fNumber2 && fNumber2 > 0.0f)) {
2741+
if ((std::isgreater(focalLength1, focalLength2) && std::isgreater(focalLength2, 0.0f)) ||
2742+
(std::isgreater(fNumber1, fNumber2) && std::isgreater(fNumber2, 0.0f))) {
27422743
os << "(" << value << ")";
27432744
return os;
27442745
}
@@ -2764,7 +2765,7 @@ std::ostream& printLensSpecification(std::ostream& os, const Value& value, const
27642765
std::ostringstream oss;
27652766
oss.copyfmt(os);
27662767

2767-
if (fNumber1 > 0.0f || fNumber2 > 0.0f) {
2768+
if (std::isgreater(fNumber1, 0.0f) || std::isgreater(fNumber2, 0.0f)) {
27682769
os << " F";
27692770
if (fNumber1 == 0.0f)
27702771
os << " n/a";

0 commit comments

Comments
 (0)