Open klosworks opened 5 years ago
Hehe...yeah I agree its pretty bad. The original idea was to have something like asio buffers which users can later customize....but that never happened. For now I will just change it to use just plain STL.
@klosworks @arun11299 It seems that std::string
can be a good replacement for std::vector<char>
. Do you agree with me?
The class Buffer has
This is a bad interface design because the
length
field duplicates thebuf.size()
. At what situations can those differ? Should they differ? It is not documented and unclear.Furthermore, the class can (and arguably should) be replaced with std::string.