summaryrefslogtreecommitdiff
path: root/Userland/Applications/Calculator/CalculatorWidget.h
diff options
context:
space:
mode:
authorcreator1creeper1 <creator1creeper1@airmail.cc>2021-08-01 13:08:53 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-08-03 19:12:06 +0430
commit8f552c9979d92aead2589c8fb3a6d9298faa5603 (patch)
tree939aa4a17146fd797c14070a874ec49eee2f717e /Userland/Applications/Calculator/CalculatorWidget.h
parent97d2a5799e78d6d37f55cbd76d0a0d6e2d88aa65 (diff)
downloadserenity-8f552c9979d92aead2589c8fb3a6d9298faa5603.zip
Calculator: Use KeypadValue class instead of double
Calculator now uses the KeypadValue class instead of double in its internal calculations. By not constantly converting to double back-and-forth, we do not use precision simply by, for example, negating a number. This fixes #7484.
Diffstat (limited to 'Userland/Applications/Calculator/CalculatorWidget.h')
-rw-r--r--Userland/Applications/Calculator/CalculatorWidget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/Calculator/CalculatorWidget.h b/Userland/Applications/Calculator/CalculatorWidget.h
index ae5e6d399e..b18570a733 100644
--- a/Userland/Applications/Calculator/CalculatorWidget.h
+++ b/Userland/Applications/Calculator/CalculatorWidget.h
@@ -9,6 +9,7 @@
#include "Calculator.h"
#include "Keypad.h"
+#include "KeypadValue.h"
#include <AK/Vector.h>
#include <LibGUI/Widget.h>
@@ -17,7 +18,7 @@ class CalculatorWidget final : public GUI::Widget {
public:
virtual ~CalculatorWidget() override;
String get_entry();
- void set_entry(double);
+ void set_entry(KeypadValue);
private:
CalculatorWidget();