Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ds-ws18
yfs-lab
Commits
657df8f5
Commit
657df8f5
authored
Nov 04, 2014
by
Anjo Vahldiek
Browse files
added marshall for rpc
parent
9e8fdc8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
rpc/rpc.cc
View file @
657df8f5
...
...
@@ -690,6 +690,15 @@ operator<<(marshall &m, unsigned long long x)
return
m
;
}
marshall
&
operator
<<
(
marshall
&
m
,
unsigned
long
x
)
{
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
int
))
return
m
<<
(
unsigned
int
)
x
;
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
long
long
))
return
m
<<
(
unsigned
long
long
)
x
;
}
void
marshall
::
pack
(
int
x
)
{
...
...
@@ -801,6 +810,15 @@ operator>>(unmarshall &u, unsigned long long &x)
return
u
;
}
unmarshall
&
operator
>>
(
unmarshall
&
u
,
unsigned
long
&
x
)
{
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
int
))
return
u
>>
(
unsigned
int
&
)
x
;
if
(
sizeof
(
unsigned
long
)
==
sizeof
(
unsigned
long
long
))
return
u
>>
(
unsigned
long
long
&
)
x
;
}
unmarshall
&
operator
>>
(
unmarshall
&
u
,
std
::
string
&
s
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment