Hein-Pieter van Braam
0e29f7974b
Reduce unnecessary COW on Vector by make writing explicit
...
This commit makes operator[] on Vector const and adds a write proxy to it. From
now on writes to Vectors need to happen through the .write proxy. So for
instance:
Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;
Failing to use the .write proxy will cause a compilation error.
In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.
_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
..
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-23 20:50:23 +02:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-06-22 11:42:21 +02:00
2018-06-07 12:52:00 -03:00
2018-06-07 12:52:00 -03:00
2018-07-26 00:54:16 +02:00
2018-06-07 12:52:00 -03:00
2018-07-26 00:54:16 +02:00
2018-06-08 21:03:27 -03:00
2018-07-26 00:54:16 +02:00
2018-06-07 12:52:00 -03:00
2018-07-26 00:54:16 +02:00
2018-07-22 11:48:59 +01:00
2018-07-26 00:54:16 +02:00
2018-04-29 23:51:36 -07:00
2018-07-15 19:29:00 -03:00
2018-07-04 09:41:12 -05:00
2018-05-11 21:37:08 +02:00
2018-05-02 08:57:56 +08:00
2018-02-21 19:46:06 +01:00
2018-06-06 13:16:52 -03:00
2018-05-19 00:40:16 +01:00
2018-04-22 19:36:01 +02:00
2018-07-26 00:54:16 +02:00
2018-05-22 13:26:13 -03:00
2018-07-26 00:54:16 +02:00
2018-06-18 22:12:08 -03:00
2018-07-26 00:54:16 +02:00
2018-04-29 18:29:32 +02:00
2018-07-26 00:54:16 +02:00
2018-01-31 16:25:42 -02:00
2018-07-15 19:29:00 -03:00
2018-07-15 19:29:00 -03:00
2018-07-10 14:47:26 +00:00
2018-07-20 18:16:19 -03:00
2018-07-20 18:16:19 -03:00
2018-07-20 18:16:19 -03:00
2018-07-20 18:16:19 -03:00
2018-03-11 14:20:32 +01:00
2018-03-11 14:20:32 +01:00
2018-07-26 00:54:16 +02:00
2018-07-25 23:41:35 +02:00
2018-02-13 18:33:51 -02:00
2018-07-04 22:37:27 +02:00
2018-07-04 09:41:12 -05:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-06-18 22:24:31 +03:00
2018-06-18 22:24:31 +03:00
2018-07-25 12:54:35 -07:00
2018-07-25 12:54:35 -07:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-07-19 19:02:04 -03:00
2018-07-19 19:02:04 -03:00
2018-07-26 00:54:16 +02:00
2018-07-19 19:02:04 -03:00
2018-07-19 19:02:04 -03:00
2018-07-18 22:27:39 -03:00
2018-02-01 16:47:20 +01:00
2018-02-01 16:47:20 +01:00
2018-07-24 09:51:03 +02:00
2018-07-18 13:49:34 +02:00
2018-01-31 18:15:06 -07:00
2018-07-22 21:23:40 +05:30
2018-07-22 21:23:40 +05:30
2018-07-26 00:54:16 +02:00
2018-02-19 22:38:58 +01:00
2018-07-02 16:32:53 -03:00
2018-04-15 19:42:48 +01:00
2018-05-22 16:56:16 +09:00
2018-07-22 11:55:56 +01:00
2018-06-07 12:52:00 -03:00
2018-05-15 17:14:31 -03:00
2018-05-08 13:45:24 +07:00
2018-01-12 00:08:32 -03:00
2018-07-18 13:49:34 +02:00
2018-04-26 23:21:05 +02:00
2018-07-26 00:54:16 +02:00
2018-02-19 21:56:28 +01:00
2018-07-26 00:54:16 +02:00
2018-07-19 19:02:04 -03:00
2018-07-26 00:54:16 +02:00
2018-07-26 00:54:16 +02:00
2018-06-07 12:52:00 -03:00
2018-06-07 12:52:00 -03:00
2018-07-26 00:54:16 +02:00
2018-01-22 00:43:19 -05:00
2018-01-22 00:43:19 -05:00
2018-07-24 20:51:53 +02:00
2018-07-24 20:51:53 +02:00
2018-06-27 20:50:25 -03:00
2018-06-27 20:50:25 -03:00
2018-07-04 09:41:12 -05:00
2018-02-25 23:04:16 +07:00
2018-07-26 00:54:16 +02:00
2018-02-22 10:00:13 +08:00
2018-06-21 03:00:33 -04:00
2018-07-19 19:02:04 -03:00
2018-07-19 19:02:04 -03:00
2018-07-26 00:54:16 +02:00
2018-07-23 20:50:23 +02:00