ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Represent/Binary.cpp
(Generate patch)

Comparing Represent/Binary.cpp (file contents):
Revision 421 by douglas, 2004-12-21T23:53:49-08:00 vs.
Revision 422 by douglas, 2005-03-09T19:08:17-08:00

# Line 21 | Line 21 | Binary::Binary(const ext::String& string
21  
22          size_t index(string.GetSize() % 8), offset(index);
23  
24 <        _rmforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, bit, 0, 8) *byte |= (string[index++] == '1') << bit;
24 >        _rforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, bit, 0, 8) *byte |= (string[index++] == '1') << bit;
25  
26          if (offset != 0)
27          {
# Line 39 | Line 39 | Binary::operator ext::String() const
39   {
40          ext::String string;
41  
42 <        _rforeach (ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, bit, 0, 8) string.InsertLast(1 & *byte >> bit ? '1' : '0');
42 >        _rforeach (const ext::Vector<byte_t>, byte, bytes) _rfor (byte_t, bit, 0, 8) string.InsertLast(1 & *byte >> bit ? '1' : '0');
43  
44          return string;
45   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines