Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 53B7B200B16 for ; Mon, 20 Jun 2016 23:52:54 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 52721160A55; Mon, 20 Jun 2016 21:52:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9A484160A26 for ; Mon, 20 Jun 2016 23:52:53 +0200 (CEST) Received: (qmail 54383 invoked by uid 500); 20 Jun 2016 21:52:52 -0000 Mailing-List: contact commits-help@quickstep.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quickstep.incubator.apache.org Delivered-To: mailing list commits@quickstep.incubator.apache.org Received: (qmail 54374 invoked by uid 99); 20 Jun 2016 21:52:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2016 21:52:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3D06D1A0897 for ; Mon, 20 Jun 2016 21:52:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id qutejhKylHl1 for ; Mon, 20 Jun 2016 21:52:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 435745F3A0 for ; Mon, 20 Jun 2016 21:52:50 +0000 (UTC) Received: (qmail 54205 invoked by uid 99); 20 Jun 2016 21:52:49 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2016 21:52:49 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 62143DFC6F; Mon, 20 Jun 2016 21:52:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hakanmemisoglu@apache.org To: commits@quickstep.incubator.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: incubator-quickstep git commit: Operators are updated. Date: Mon, 20 Jun 2016 21:52:49 +0000 (UTC) archived-at: Mon, 20 Jun 2016 21:52:54 -0000 Repository: incubator-quickstep Updated Branches: refs/heads/decimal-type 0acaf423a -> aebb4a3bd Operators are updated. Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/aebb4a3b Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/aebb4a3b Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/aebb4a3b Branch: refs/heads/decimal-type Commit: aebb4a3bd2d1bd98c77e7a3db03888db0d931ffb Parents: 0acaf42 Author: Hakan Memisoglu Authored: Mon Jun 20 16:52:27 2016 -0500 Committer: Hakan Memisoglu Committed: Mon Jun 20 16:52:27 2016 -0500 ---------------------------------------------------------------------- types/DecimalLit.hpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/aebb4a3b/types/DecimalLit.hpp ---------------------------------------------------------------------- diff --git a/types/DecimalLit.hpp b/types/DecimalLit.hpp index 5d7b4a5..2b1ae8a 100644 --- a/types/DecimalLit.hpp +++ b/types/DecimalLit.hpp @@ -195,7 +195,9 @@ struct DecimalLit { * @return Negative of this. **/ inline DecimalLit operator-() const { - return DecimalLit{-data_}; + DecimalLit result; + result.data_ = -result.data_; + return result; } /** @@ -205,7 +207,9 @@ struct DecimalLit { * @return Sum of this and other. **/ inline DecimalLit operator+(const DecimalLit& other) const { - return DecimalLit{data_ + other.data_}; + DecimalLit result; + result.data_ = data_ + other.data_; + return result; } /** @@ -215,7 +219,9 @@ struct DecimalLit { * @return Subtraction of other from this. **/ inline DecimalLit operator-(const DecimalLit& other) const { - return DecimalLit{data_ - other.data_}; + DecimalLit result; + result.data_ = data_ - other.data_; + return result; } /** @@ -225,7 +231,9 @@ struct DecimalLit { * @return Multiplication of this and other. **/ inline DecimalLit operator*(const DecimalLit& other) const { - return DecimalLit{(data_ * other.data_) / kMaxFractionInt}; + DecimalLit result; + result.data_ = (data_ * other.data_) / kMaxFractionInt; + return result; } /** @@ -235,7 +243,9 @@ struct DecimalLit { * @return Division of this with other. **/ inline DecimalLit operator/(const DecimalLit& other) const { - return DecimalLit{(data_ * kMaxFractionInt) / other.data_}; + DecimalLit result; + result.data_ = (data_ * kMaxFractionInt) / other.data_; + return result; } /** @@ -245,7 +255,9 @@ struct DecimalLit { * @return This modulo other. **/ inline DecimalLit operator%(const DecimalLit& other) const { - return DecimalLit{data_ % other.data_}; + DecimalLit result; + result.data_ = data_ % other.data_; + return result; } /**