
Example 05: ToggleOptimizations

This example demonstrates how to toggle optimizations for a single file or several files at once.
These are the available options you can use:
*) Put the macro LPP_DISABLE_OPTIMIZATIONS at the top of a file, as demonstrated in PalettizedFrameBuffer.cpp
*) Select one or more files in the "Compilands" view in the Broker, right-click to open a context menu, and
   select "Toggle optimizations for selected compilands".
*) Press the default shortcut "CTRL+ALT+O" in Visual Studio, and the currently opened file will have its
   optimization state toggled, which can be verified in the "Compilands" view as well.

Put a breakpoint in the code in e.g. SpawnFire() in PalettizedFrameBuffer.cpp to verify that the code has
indeed been optimized, making the instruction pointer arrow jump back and forth between source lines in the
debugger. After optimizations have been disabled, notice that the code can now be debugged more easily.

Once you're finished debugging, you can toggle the optimization state once more and go back to a fully
optimized build by using any of the above options.

Interesting things to look at and try out have been marked with "Live++" in the source code.
