[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/002 5d2e8ec 49/65: prefer to avoid operator=

From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/002 5d2e8ec 49/65: prefer to avoid operator=(double)?
Date: Wed, 16 Sep 2020 16:55:20 -0400 (EDT)

branch: valyuta/002
commit 5d2e8ec4370b1ba4b6ac47f7fefe0684d27327aa
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    prefer to avoid operator=(double)?
    is it better to use a ctor, even if only because ctors can be explicit?
 gpt_specamt.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpt_specamt.cpp b/gpt_specamt.cpp
index ee4417b..e7b192d 100644
--- a/gpt_specamt.cpp
+++ b/gpt_specamt.cpp
@@ -97,7 +97,7 @@ class FindSpecAmt
     double operator()(double a_Trial)
-        SpecAmt = a_Trial;
+        SpecAmt = currency(a_Trial);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]