ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/dclient/include/adt/array_map.h
(Generate patch)

Comparing deliantra/dclient/include/adt/array_map.h (file contents):
Revision 1.1 by sf-pippijn, Sun Oct 17 08:14:44 2010 UTC vs.
Revision 1.2 by sf-pippijn, Mon Oct 18 06:53:54 2010 UTC

8{ 8{
9 typedef unsigned char size_type; 9 typedef unsigned char size_type;
10 10
11 array_map (std::initializer_list<std::pair<size_type, T>> init) 11 array_map (std::initializer_list<std::pair<size_type, T>> init)
12 { 12 {
13 for (auto const &pair : init) 13 foreach (auto const &pair, init)
14 { 14 {
15 if (pair.first >= data.size ()) 15 if (pair.first >= data.size ())
16 data.resize (pair.first + 1); 16 data.resize (pair.first + 1);
17 data.at (pair.first) = pair.second; 17 data.at (pair.first) = pair.second;
18 } 18 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines