mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-22 16:41:18 +01:00
Remove CommandContext::GetProject() ...
... which called ::GetActiveProject(), but one purpose of the CommandContext class was to eliminate many uses of that global function, because a CommandContext must always be constructed from a reference to a project (which was always in fact the active one), then passed around to where it is needed! Also, just use the project member directly -- because CommandContext was intended as just a P.O.D (plain-old-data) structure. This also eliminates a dependency of CommandContext.cpp on Project.cpp. This is not enough by itself to break any dependency cycles.
This commit is contained in:
@@ -25,7 +25,7 @@ class CommandContext;
|
||||
class CommandHandler
|
||||
{
|
||||
private:
|
||||
std::unique_ptr<CommandContext> mCurrentContext;
|
||||
std::unique_ptr<const CommandContext> mCurrentContext;
|
||||
|
||||
public:
|
||||
CommandHandler();
|
||||
|
||||
Reference in New Issue
Block a user