Short C++17 question, expert help wanted
I have been doing some research on the inline keyword in C++, since my IDE (CLion) is... giving it a lot of preferential treatment.
From what I have read, correct me if I am wrong, it is primarily an optimization **when used on functions**. Forcing the compiler to insert the function contents directly wherever it's called when it assembles into opcode, removing the overhead of calling a subroutine, but potentially decreasing efficiency in other ways--low level CPU cache/branch predict stuff the compiler will probably decide for me anyway and that I don't have a great understanding of yet.
However, I cannot find a super clear answer on what cons this may have for *variables*.
Say I have a static variable in a namespace:
namespace stuff {
uint8_t x = 69;
}
What are some potential DRAWBACKS, if any, to making this inline? I can only find information on advantages, but that it should otherwise be left alone because the compiler will do it anyway if it's analysis deems necessary. The consensus seems to be "none" but I want to be sure because there is a lot of bad advice out there.
Thanks
found a bug that lets you skip an entire boss battle, thus preventing the game from being finished :)
thankfully it's not something that a regular player would be able to encounter because of another bug, which i also fixed. but you can very easily do that in debug mode and then you can't actually beat the game after that unless you modify your save file or open the engine and make an alternative way to get the key item.
Okay so I've tried about a million different things and everything either just A. goes super speed, B. Freezes after Tick #2 or C. Behaves exactly the same
I am 100% certain this should be working because it is exactly what I did with the FPS cap...
So it looks like the woke FOSS crowd has taken notice of OpenMandriva and is boycotting a FOSDEM event that the OpenMandriva co-founder is holding. I'm not familiar with FOSDEM so I don't know if they could get them kicked out of the convention entirely, but I expect these parasites to try to kick them out of as many FOSS spaces as possible.
Top 100 Games 2025 Edition!
Again there are probably some things I forgot, and judging by how far a lot of these moved from their positions int he last list I made, a lot of these games are so close to each other that their placement isn't 100% set in stone. These are just a lot of my favorite games!
gamedev
You can now purchase bombs which will increase your maximum bomb count.
#gamedev #gamedevelopment #indiegamedev #indiedev #indiegames #indie #SFML #cplusplus