1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
--- ./classes/src/ArtsBgp4AsPathSegment.cc.orig Mon Oct 2 13:05:23 2000
+++ ./classes/src/ArtsBgp4AsPathSegment.cc Wed Sep 25 16:38:10 2002
@@ -137,13 +137,13 @@
//............................................................................
//
//----------------------------------------------------------------------------
-istream & ArtsBgp4AsPathSegment::read(istream & is, uint8_t version = 0)
+istream & ArtsBgp4AsPathSegment::read(istream & is, uint8_t version)
{
uint8_t numAses;
uint16_t as;
- is.read(&this->_type,sizeof(this->_type));
- is.read(&numAses,sizeof(numAses));
+ is.read((char *)&this->_type,sizeof(this->_type));
+ is.read((char *)&numAses,sizeof(numAses));
if (numAses > 0) {
this->_AS.reserve(numAses);
for (int asNum = 0; asNum < numAses; asNum++) {
@@ -160,7 +160,7 @@
//............................................................................
//
//----------------------------------------------------------------------------
-int ArtsBgp4AsPathSegment::read(int fd, uint8_t version = 0)
+int ArtsBgp4AsPathSegment::read(int fd, uint8_t version)
{
int rc;
uint8_t numAses;
@@ -196,12 +196,12 @@
//
//----------------------------------------------------------------------------
ostream & ArtsBgp4AsPathSegment::write(ostream & os,
- uint8_t version = 0) const
+ uint8_t version) const
{
- os.write(&this->_type,sizeof(this->_type));
+ os.write((char *)&this->_type,sizeof(this->_type));
uint8_t numAses = this->_AS.size();
- os.write(&numAses,sizeof(numAses));
+ os.write((char *)&numAses,sizeof(numAses));
for (int asNum = 0; asNum < numAses; asNum++) {
g_ArtsLibInternal_Primitive.WriteUint16(os,this->_AS[asNum],
@@ -215,7 +215,7 @@
//............................................................................
//
//----------------------------------------------------------------------------
-int ArtsBgp4AsPathSegment::write(int fd, uint8_t version = 0) const
+int ArtsBgp4AsPathSegment::write(int fd, uint8_t version) const
{
int rc;
uint8_t numAses;
@@ -246,7 +246,7 @@
//............................................................................
//
//----------------------------------------------------------------------------
-uint32_t ArtsBgp4AsPathSegment::Length(uint8_t version = 0) const
+uint32_t ArtsBgp4AsPathSegment::Length(uint8_t version) const
{
return(sizeof(this->_type) + sizeof(uint8_t) +
(sizeof(uint16_t) * this->_AS.size()));
|