summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza@ociweb.com>2015-04-23 11:36:05 -0500
committerAdam Mitz <mitza@ociweb.com>2015-04-23 11:36:05 -0500
commit05e09b137d8fd76cade084da321f9c0886537603 (patch)
tree094ae8be524d3bc804fb90015957d2aa2d3d6371
parent663f0270441a3b5951a3a02daf460eb708d65e9f (diff)
downloadATCD-05e09b137d8fd76cade084da321f9c0886537603.tar.gz
ACE_CDR::Fixed::from_octets() added optional parameter for scale.
-rw-r--r--ACE/ace/CDR_Base.cpp5
-rw-r--r--ACE/ace/CDR_Base.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/ACE/ace/CDR_Base.cpp b/ACE/ace/CDR_Base.cpp
index 488358e5546..8a291ac8b75 100644
--- a/ACE/ace/CDR_Base.cpp
+++ b/ACE/ace/CDR_Base.cpp
@@ -978,12 +978,13 @@ ACE_CDR::Fixed ACE_CDR::Fixed::from_string (const char *str)
return f;
}
-ACE_CDR::Fixed ACE_CDR::Fixed::from_octets (const Octet *array, int len)
+ACE_CDR::Fixed ACE_CDR::Fixed::from_octets (const Octet *array, int len,
+ unsigned int scale)
{
Fixed f;
ACE_OS::memcpy (f.value_ + 16 - len, array, len);
ACE_OS::memset (f.value_, 0, 16 - len);
- f.scale_ = 0;
+ f.scale_ = scale;
f.digits_ = len * 2 - 1;
if (len > 1 && (array[0] >> 4) == 0)
diff --git a/ACE/ace/CDR_Base.h b/ACE/ace/CDR_Base.h
index 8d0ab650be1..039f3bc38dc 100644
--- a/ACE/ace/CDR_Base.h
+++ b/ACE/ace/CDR_Base.h
@@ -380,7 +380,8 @@ public:
static Fixed from_integer (ULongLong val);
static Fixed from_floating (LongDouble val);
static Fixed from_string (const char *str);
- static Fixed from_octets (const Octet *array, int len);
+ static Fixed from_octets (const Octet *array, int len,
+ unsigned int scale = 0);
operator LongLong () const;
operator LongDouble () const;