From c905e535a24dd3737b869d86634e273e01ae3581 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 22 Dec 2010 22:39:17 +0000 Subject: [PATCH] Fix CID-5982-5985: * assign arrays members explicitly instead in initialization list git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39921 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/locale/FormattingConventions.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kits/locale/FormattingConventions.cpp b/src/kits/locale/FormattingConventions.cpp index be05e2927f..a53c5c0a93 100644 --- a/src/kits/locale/FormattingConventions.cpp +++ b/src/kits/locale/FormattingConventions.cpp @@ -199,19 +199,23 @@ BFormattingConventions::BFormattingConventions(const char* id) BFormattingConventions::BFormattingConventions( const BFormattingConventions& other) : - fCachedDateFormats(other.fCachedDateFormats), - fCachedTimeFormats(other.fCachedTimeFormats), fCachedNumericFormat(other.fCachedNumericFormat), fCachedMonetaryFormat(other.fCachedMonetaryFormat), fCachedUse24HourClock(other.fCachedUse24HourClock), - fExplicitDateFormats(other.fExplicitDateFormats), - fExplicitTimeFormats(other.fExplicitTimeFormats), fExplicitNumericFormat(other.fExplicitNumericFormat), fExplicitMonetaryFormat(other.fExplicitMonetaryFormat), fExplicitUse24HourClock(other.fExplicitUse24HourClock), fUseStringsFromPreferredLanguage(other.fUseStringsFromPreferredLanguage), fICULocale(new ICU_VERSION::Locale(*other.fICULocale)) { + for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT; ++s) + fCachedDateFormats[s] = other.fCachedDateFormats[s]; + for (int s = 0; s < B_TIME_FORMAT_STYLE_COUNT; ++s) + fCachedTimeFormats[s] = other.fCachedTimeFormats[s]; + for (int s = 0; s < B_DATE_FORMAT_STYLE_COUNT; ++s) + fExplicitDateFormats[s] = other.fExplicitDateFormats[s]; + for (int s = 0; s < B_TIME_FORMAT_STYLE_COUNT; ++s) + fExplicitTimeFormats[s] = other.fExplicitTimeFormats[s]; }