It shows up when using libloot as a FetchContent dependency, and it's a bit confusing to have libloot and libloot-cpp-build when the latter isn't the one that a C++ project should really depend on.
libloot-cargo may still be confusing, but at least indicates what is involved.
unique_ptr is simpler, and can be easily converted to shared_ptr if needed, and makes it obvious that each call will return a new pointer.
This does mean that if I want to hold onto the objects again in the future for some reason, that'll need the API to change back, but that seems unlikely.
unique_ptr not being copyable does make using it a little more awkward, but that only happened in one place in LOOT's code, and there the pointer needs to become shared anyway.
The C++ wrapper defaults it to true, so the behaviour hasn't changed for
existing callers that don't pass a value for the evaluateConditions
parameter, i.e. that call GetGeneralMessages().
Since the new parameter comes before evaluateConditions,
existing GetGeneralMessages(true) and GetGeneralMessages(false) calls
need to be replaced with GetGeneralMessages(true, true) and
GetGeneralMessages(true, false) to retain their existing behaviour. The
parameter order was chosen to match that of GetPluginMetadata(), at the
cost of this backwards incompatibility.
On Windows using "loot" causes a name collisions with LOOT itself:
- for the MSVC project name, it clashes with LOOT's own project,
despite the difference in case. This means that you can't build LOOT
in Visual Studio when using FetchContent to handle the libloot
dependency (running CMake on the CLI works though).
- for the PDB file, LOOT has LOOT.pdb and libloot has loot.pdb, which
appear to be the same due to file paths being case-insensitive. This
makes it more difficult to debug LOOT with the relevant debug info
loaded.
Renaming the CMake target adds a "lib" prefix to the Visual Studio
project name and the artifact filenames:
- loot.vcxproj* -> libloot.vcxproj*
- loot.dll -> libloot.dll
- loot.lib -> libloot.lib
- loot.pdb -> libloot.pdb
The Linux build artifact filenames are unchanged, as they already had
the "lib" prefix.