Boost logo

Boost :

From: Borgerding, Mark A. (MarkAB_at_[hidden])
Date: 2000-03-10 17:27:57


> -----Original Message-----
> From: Miki Jovanovic [mailto:miki_at_[hidden]]
> Sent: Friday, March 10, 2000 5:04 PM
> To: boost_at_[hidden]
> Subject: [boost] Re: endian handling classes
>
>
> "borgerding, mark a." <marka-_at_[hidden]> wrote:
> > I had an idea today for a way to more easily write portable
> networking code.
>
> Hi Mark,
>
> Good idea all around. If I remember correctly, someone else
> suggested a
> very similar approach some time in the past. I can't seem to find that
> post now. It would be nice to find it to compare notes and to
> recognize
> effort.

Marco, is this what you referred to?
I will look through the archives and see what I can find.

>
> As a very small comment, in this particular case I would avoid default
> initialising variables with 0. They should really be
> initialised by the
> user. Empty constructor:
>
> big_endian() {}

I guess I was thinking that the 0 initiallization would obviate the need for
the oft-used
" memset(mystruct,0,sizeof(mystruct)); "
I do not have strong feelings either way, I will defer to the will of the
collective ;)

>
> I do think you could have structured your code better, but
> hey, I don't
> remember anyone else commenting on style, so I won't nit-pick on it
> either.

Well the class is only about 2 hours old right now, so its not terribly
polished. I will clean it up, comment it, and boost it before I put it in
the vault.

Thanks for the comments,
- Mark


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk