intl/icu/source/i18n/curramt.cpp

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /*
     2 **********************************************************************
     3 * Copyright (c) 2004, International Business Machines
     4 * Corporation and others.  All Rights Reserved.
     5 **********************************************************************
     6 * Author: Alan Liu
     7 * Created: April 26, 2004
     8 * Since: ICU 3.0
     9 **********************************************************************
    10 */
    11 #include "unicode/utypes.h"
    13 #if !UCONFIG_NO_FORMATTING
    15 #include "unicode/curramt.h"
    16 #include "unicode/currunit.h"
    18 U_NAMESPACE_BEGIN
    20 CurrencyAmount::CurrencyAmount(const Formattable& amount, const UChar* isoCode,
    21                                UErrorCode& ec) :
    22     Measure(amount, new CurrencyUnit(isoCode, ec), ec) {
    23 }
    25 CurrencyAmount::CurrencyAmount(double amount, const UChar* isoCode,
    26                                UErrorCode& ec) :
    27     Measure(Formattable(amount), new CurrencyUnit(isoCode, ec), ec) {
    28 }
    30 CurrencyAmount::CurrencyAmount(const CurrencyAmount& other) :
    31     Measure(other) {
    32 }
    34 CurrencyAmount& CurrencyAmount::operator=(const CurrencyAmount& other) {
    35     Measure::operator=(other);
    36     return *this;
    37 }
    39 UObject* CurrencyAmount::clone() const {
    40     return new CurrencyAmount(*this);
    41 }
    43 CurrencyAmount::~CurrencyAmount() {
    44 }
    46 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CurrencyAmount)
    48 U_NAMESPACE_END
    50 #endif // !UCONFIG_NO_FORMATTING

mercurial