| Time |
Nick |
Message |
| 04:08 |
|
luatic joined #luanti-dev |
| 04:08 |
|
BuckarooBanzai8 joined #luanti-dev |
| 04:09 |
|
dv^_^0 joined #luanti-dev |
| 04:10 |
|
swift110-mobile_ joined #luanti-dev |
| 04:10 |
|
luk3yx joined #luanti-dev |
| 04:33 |
|
aliasreadytaken joined #luanti-dev |
| 05:00 |
|
MTDiscord joined #luanti-dev |
| 12:57 |
|
Alias joined #luanti-dev |
| 13:54 |
|
SFENCE joined #luanti-dev |
| 14:02 |
|
SpaceMan1ac joined #luanti-dev |
| 14:04 |
|
dzho_ joined #luanti-dev |
| 14:05 |
|
Sokomine_ joined #luanti-dev |
| 14:10 |
|
Sheriff_U3 joined #luanti-dev |
| 14:15 |
|
book` joined #luanti-dev |
| 15:23 |
|
Sheriff_U3 joined #luanti-dev |
| 15:36 |
|
Sheriff_U3 joined #luanti-dev |
| 16:16 |
|
SFENCE joined #luanti-dev |
| 16:35 |
|
SFENCE joined #luanti-dev |
| 16:39 |
|
SFENCE joined #luanti-dev |
| 16:45 |
|
SFENCE joined #luanti-dev |
| 16:54 |
|
SFENCE joined #luanti-dev |
| 16:56 |
|
SFENCE joined #luanti-dev |
| 17:31 |
|
SFENCE joined #luanti-dev |
| 17:34 |
|
SFENCE joined #luanti-dev |
| 19:33 |
|
lhofhansl joined #luanti-dev |
| 19:34 |
lhofhansl |
Hi... Will merge #16931 soon (trivial and slight client performance change) |
| 19:34 |
ShadowBot |
https://github.com/luanti-org/luanti/issues/16931 -- Avoid a copy of block pointers in client timer update by lhofhansl |
| 19:35 |
lhofhansl |
Maybe a related change is possible on the server (in a different PR) |
| 19:44 |
lhofhansl |
Done |
| 19:50 |
Krock |
lhofhansl: why do you need the const_cast at all? |
| 19:54 |
|
crazylad joined #luanti-dev |
| 20:01 |
lhofhansl |
The direct access to the sectors block is only allowed for const sectors. In the second loop the sectors are modified (blocks get removed) and so there it needs to be non-const. |
| 20:03 |
lhofhansl |
... sector's block... :) |
| 20:05 |
Krock |
> This is explicitly only allowed on a const object since modifying anything while iterating is unsafe. |
| 20:07 |
Krock |
so if the returned container could be made constant but not its MapBlock value, that would be technically the best solution |
| 20:07 |
Krock |
since it addresses both concerns |
| 20:08 |
lhofhansl |
Yes. That would be better, indeed. |
| 20:08 |
sfan5 |
it's casting the sector, not the block |
| 20:09 |
sfan5 |
but I suppose the TimeOrderedMapBlock() constructor could take a const sector |
| 20:10 |
lhofhansl |
When I added that API while back, I forced this to be a const method for safety. I can try casting the returned collection to const so that I cannot be modified. |
| 20:10 |
Krock |
unfortunately "b.sect->deleteBlock(block);" cannot be made const |
| 20:11 |
lhofhansl |
In thise case TimeOrderedMapBlock needs a non-const sector, because it is later used to call non-const methods that modify it's block collection. |
| 20:15 |
lhofhansl |
Actually, no. Not the collection, but the Sector must be const. The Sector needs to be const, so that it is safe to use the returned collection. I think the API is good the way it is. (Of course there might other pointers to the same sector. but that's a different problem). |
| 20:23 |
|
SFENCE joined #luanti-dev |
| 20:23 |
rubenwardy |
Anyone able to give this a second review please https://github.com/luanti-org/luanti/pull/14543 |
| 20:29 |
|
nekobit joined #luanti-dev |
| 20:29 |
|
SFENCE joined #luanti-dev |
| 20:46 |
Krock |
what happens if two games claim to be an alias? |
| 20:46 |
Krock |
( .. of the same game?) |
| 20:46 |
Krock |
nvm. pkgmgr.find_by_gameid logs a warning |
| 23:23 |
|
nore joined #luanti-dev |
| 23:26 |
|
nekobit joined #luanti-dev |
| 23:33 |
|
panwolfram joined #luanti-dev |