Mario Zechner on Nostr: this->skeleton is a Skeleton&. auto will infer Skeleton. A copy is created. The copy ...
this->skeleton is a Skeleton&. auto will infer Skeleton. A copy is created. The copy is a shallow copy, which gets destructed at the end of the block. Which smokes the internals of the original Skeleton. Which makes things go boom.
auto is now banned in my C++ code bases.
Published at
2024-01-03 08:35:11Event JSON
{
"id": "c0d67322623636368685643d2a7d4b0e622939b8500fcf039f640be743c64968",
"pubkey": "be81b496ea025894275a88346ffbf7d217a8886f108185e401387647eff089b4",
"created_at": 1704270911,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.gamedev.place/users/badlogic/statuses/111691098448822150",
"activitypub"
]
],
"content": "this-\u003eskeleton is a Skeleton\u0026. auto will infer Skeleton. A copy is created. The copy is a shallow copy, which gets destructed at the end of the block. Which smokes the internals of the original Skeleton. Which makes things go boom.\n\nauto is now banned in my C++ code bases.\n\nhttps://cdn.masto.host/mastodongamedevplace/media_attachments/files/111/691/095/235/354/703/original/13afd223c7dce25c.png",
"sig": "a88555d9281b2730eef7072643c46351197f098615541dbbca7c8006d6f954c2046525ea32e4a8109b4fc312bd2e97f4e0f4c91c433b53f79111931ca7c72886"
}