summaryrefslogtreecommitdiff
path: root/ACE/ace
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-07-23 06:35:51 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-07-23 06:35:51 +0000
commit60bc91dd8f8cbf4a461daf5e69b874043e36cf31 (patch)
treeb6d9431365a3e0392ccaf08e0b700e6ad85029f3 /ACE/ace
parent66d132d94ca9263c70995749eb87d53deec7053c (diff)
downloadATCD-60bc91dd8f8cbf4a461daf5e69b874043e36cf31.tar.gz
Sun Jul 22 06:34:30 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace')
-rw-r--r--ACE/ace/CDR_Stream.cpp8
-rw-r--r--ACE/ace/CDR_Stream.h18
-rw-r--r--ACE/ace/CDR_Stream.inl21
-rw-r--r--ACE/ace/SPIPE_Stream.inl6
4 files changed, 20 insertions, 33 deletions
diff --git a/ACE/ace/CDR_Stream.cpp b/ACE/ace/CDR_Stream.cpp
index 0fc54be8f11..515a9a222fa 100644
--- a/ACE/ace/CDR_Stream.cpp
+++ b/ACE/ace/CDR_Stream.cpp
@@ -14,7 +14,7 @@ ACE_RCSID (ace,
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
-int ACE_OutputCDR::wchar_maxbytes_ = sizeof (ACE_CDR::WChar);
+size_t ACE_OutputCDR::wchar_maxbytes_ = sizeof (ACE_CDR::WChar);
ACE_OutputCDR::ACE_OutputCDR (size_t size,
int byte_order,
@@ -139,12 +139,12 @@ ACE_OutputCDR::ACE_OutputCDR (ACE_Message_Block *data,
}
/*static*/ void
-ACE_OutputCDR::wchar_maxbytes (int maxbytes)
+ACE_OutputCDR::wchar_maxbytes (size_t maxbytes)
{
ACE_OutputCDR::wchar_maxbytes_ = maxbytes;
}
-/*static*/ int
+/*static*/ size_t
ACE_OutputCDR::wchar_maxbytes ()
{
return ACE_OutputCDR::wchar_maxbytes_;
@@ -567,7 +567,7 @@ ACE_OutputCDR::write_wchar_array_i (const ACE_CDR::WChar *x,
if (length == 0)
return true;
char* buf = 0;
- const size_t align = (ACE_OutputCDR::wchar_maxbytes_ == 2) ?
+ size_t const align = (ACE_OutputCDR::wchar_maxbytes_ == 2) ?
ACE_CDR::SHORT_ALIGN :
ACE_CDR::OCTET_ALIGN;
diff --git a/ACE/ace/CDR_Stream.h b/ACE/ace/CDR_Stream.h
index 48ba7af2809..4c95bdf13e0 100644
--- a/ACE/ace/CDR_Stream.h
+++ b/ACE/ace/CDR_Stream.h
@@ -383,10 +383,10 @@ public:
/// set the global size of serialized wchars. This may be different
/// than the size of a wchar_t.
- static void wchar_maxbytes (int );
+ static void wchar_maxbytes (size_t max_bytes);
/// access the serialized size of wchars.
- static int wchar_maxbytes (void);
+ static size_t wchar_maxbytes (void);
/**
* Return alignment of the wr_ptr(), with respect to the start of
@@ -425,12 +425,10 @@ public:
void reset_byte_order (int byte_order);
/// set GIOP version info
- int set_version (ACE_CDR::Octet major,
- ACE_CDR::Octet minor);
+ void set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor);
/// Set the underlying GIOP version..
- int get_version (ACE_CDR::Octet &major,
- ACE_CDR::Octet &minor);
+ void get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor);
private:
@@ -542,7 +540,7 @@ protected:
* or not having a native wchar codeset defined, the maxbytes is
* set to zero, indicating no wchar data is allowed.
*/
- static int wchar_maxbytes_;
+ static size_t wchar_maxbytes_;
};
@@ -933,12 +931,10 @@ public:
char *&buf);
/// Set the underlying GIOP version..
- int set_version (ACE_CDR::Octet major,
- ACE_CDR::Octet minor);
+ void set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor);
/// Set the underlying GIOP version..
- int get_version (ACE_CDR::Octet &major,
- ACE_CDR::Octet &minor);
+ void get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor);
protected:
diff --git a/ACE/ace/CDR_Stream.inl b/ACE/ace/CDR_Stream.inl
index c4c401055df..c8711ca3f65 100644
--- a/ACE/ace/CDR_Stream.inl
+++ b/ACE/ace/CDR_Stream.inl
@@ -468,21 +468,18 @@ ACE_OutputCDR::adjust (size_t size, char*& buf)
return this->adjust (size, size, buf);
}
-ACE_INLINE int
+ACE_INLINE void
ACE_OutputCDR::set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor)
{
this->major_version_ = major;
this->minor_version_ = minor;
- return 0;
}
-ACE_INLINE int
-ACE_OutputCDR::get_version (ACE_CDR::Octet &major,
- ACE_CDR::Octet &minor)
+ACE_INLINE void
+ACE_OutputCDR::get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor)
{
major = this->major_version_;
minor = this->minor_version_;
- return 0;
}
@@ -1483,22 +1480,18 @@ ACE_InputCDR::align_read_ptr (size_t alignment)
return -1;
}
-ACE_INLINE int
-ACE_InputCDR::set_version (ACE_CDR::Octet major,
- ACE_CDR::Octet minor)
+ACE_INLINE void
+ACE_InputCDR::set_version (ACE_CDR::Octet major, ACE_CDR::Octet minor)
{
this->major_version_ = major;
this->minor_version_ = minor;
- return 0;
}
-ACE_INLINE int
-ACE_InputCDR::get_version (ACE_CDR::Octet &major,
- ACE_CDR::Octet &minor)
+ACE_INLINE void
+ACE_InputCDR::get_version (ACE_CDR::Octet &major, ACE_CDR::Octet &minor)
{
major = this->major_version_;
minor = this->minor_version_;
- return 0;
}
ACE_INLINE ACE_Char_Codeset_Translator *
diff --git a/ACE/ace/SPIPE_Stream.inl b/ACE/ace/SPIPE_Stream.inl
index dbc3725782c..94ca51dcf65 100644
--- a/ACE/ace/SPIPE_Stream.inl
+++ b/ACE/ace/SPIPE_Stream.inl
@@ -110,8 +110,7 @@ ACE_SPIPE_Stream::send_handle (ACE_HANDLE handle) const
!defined (ACE_HAS_WINCE) /* CE4 has WS2 but not WSADuplicateSocket */
DWORD procID;
WSAPROTOCOL_INFO protInfo;
- ssize_t res;
- res = this->recv(&procID, sizeof(procID));
+ ssize_t res = this->recv(&procID, sizeof(procID));
if (res != sizeof(procID))
{
if(res != -1)
@@ -165,8 +164,7 @@ ACE_SPIPE_Stream::recv_handle (ACE_HANDLE &handle) const
(defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0))
pid_t procID = ACE_OS::getpid();
WSAPROTOCOL_INFO protInfo;
- ssize_t res;
- res = this->send(&procID, sizeof(procID));
+ ssize_t res = this->send(&procID, sizeof(procID));
if (res != sizeof(procID))
{
if(res != -1)