Repository: incubator-quickstep
Updated Branches:
  refs/heads/decimal-type 88306cbdb -> ec37551d8


DecimalLit constructors.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/ec37551d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/ec37551d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/ec37551d

Branch: refs/heads/decimal-type
Commit: ec37551d835781046c2ce24c06eaf1a86fb84816
Parents: 88306cb
Author: Hakan Memisoglu <[email protected]>
Authored: Mon Jun 20 14:08:25 2016 -0500
Committer: Hakan Memisoglu <[email protected]>
Committed: Mon Jun 20 14:08:25 2016 -0500

----------------------------------------------------------------------
 types/DecimalLit.hpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ec37551d/types/DecimalLit.hpp
----------------------------------------------------------------------
diff --git a/types/DecimalLit.hpp b/types/DecimalLit.hpp
index f73a939..c16a0f2 100644
--- a/types/DecimalLit.hpp
+++ b/types/DecimalLit.hpp
@@ -277,11 +277,19 @@ struct DecimalLit {
   DecimalLit() = default;
 
   explicit DecimalLit(const int value)
-    : data_(value * kMaxFractionInt) {
+    : data_(static_cast<data_type>(value * kMaxFractionInt)) {
   }
 
   explicit DecimalLit(const long value)
-    : data_(value * kMaxFractionInt) {
+    : data_(static_cast<data_type>(value * kMaxFractionInt)) {
+  }
+
+  explicit DecimalLit(const float value)
+    : data_(static_cast<data_type>(value * kMaxFractionInt)) {
+  }
+
+  explicit DecimalLit(const double value)
+    : data_(static_cast<data_type>(value * kMaxFractionInt)) {
   }
 };
 

Reply via email to