Skip to content

Commit

Permalink
Document the Engine renaming better & link to relevant issues/PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wallacoloo committed Dec 29, 2015
1 parent c1c9882 commit 665466c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions include/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ class Song;
class Ladspa2LMMS;


// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming
// conflicts caused by ZynAddSubFX. See https://github.com/LMMS/lmms/issues/2269
// and https://github.com/LMMS/lmms/pull/2118 for more details.
//
// The workaround was to rename Lmms' Engine so that it has a different symbol
// name in the object files, but typedef it back to 'Engine' and keep it inside
// inside of Engine.h so that the rest of the codebase can be oblivious to this
// issue (and it could be fixed without changing every single file).

class LmmsCore;
typedef LmmsCore Engine;

class EXPORT LmmsCore : public QObject
{
Q_OBJECT
Expand Down Expand Up @@ -134,8 +146,5 @@ class EXPORT LmmsCore : public QObject
};


// define the class as "LmmsCore" to avoid symbol name clashes with ZynAddSubFx's Engine class,
// but typedef to Engine so that the rest of Lmms can pretend the name clash doesn't exist.
typedef LmmsCore Engine;

#endif

0 comments on commit 665466c

Please sign in to comment.