Skip to content

Commit

Permalink
Set visibility to hidden by default
Browse files Browse the repository at this point in the history
  • Loading branch information
crsib committed Nov 21, 2023
1 parent 670c21e commit 64e9d3d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 16 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND
message(FATAL_ERROR "Audacity requires at least GCC 4.9")
endif ()

set(CMAKE_CXX_VISIBILITY_PRESET hidden)

if( EXISTS "${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules/Variables.cmake" )
include( "${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules/Variables.cmake" )
endif()
Expand Down Expand Up @@ -168,6 +170,10 @@ if( APPLE )
endif()
endif()

if(NOT MSVC)
set( HAVE_VISIBILITY 1 )
endif()

# Load our functions/macros
include( AudacityFunctions )

Expand Down Expand Up @@ -659,10 +665,8 @@ add_subdirectory( "tests/journals" )
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( src/audacity_config.h.in src/private/configwin.h )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( HAVE_VISIBILITY 1 )
configure_file( src/audacity_config.h.in src/private/configmac.h )
else()
set( HAVE_VISIBILITY 1 )
configure_file( src/audacity_config.h.in src/private/configunix.h )
endif()

Expand Down
6 changes: 3 additions & 3 deletions libraries/lib-menus/CommandManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MENUS_API CommandManager /* not final */
CommandFlag & flags, CommandFlag flagsRqd );

CommandFlag mLastFlags = AlwaysEnabledFlag;

// Last effect applied to this project
PluginID mLastGenerator{};
PluginID mLastEffect{};
Expand Down Expand Up @@ -135,7 +135,7 @@ class MENUS_API CommandManager /* not final */
void DoVisit(const Registry::SingleItem &item);
void DoEndGroup(
const MenuRegistry::GroupItem<MenuRegistry::Traits> &item);

//! Called by DoBeginGroup
//! Default implementation does nothing
virtual void BeginMenu(const TranslatableString & tName);
Expand Down Expand Up @@ -312,7 +312,7 @@ class MENUS_API CommandManager /* not final */
private:

static int NextIdentifier(int ID);

protected:
bool HandleCommandEntry(
const CommandListEntry * entry, CommandFlag flags,
Expand Down
22 changes: 11 additions & 11 deletions libraries/lib-menus/CommandTargets.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ should be reference-counted.
\class CommandMessageTargetDecorator
\brief CommandMessageTargetDecorator is a CommandOutputTarget that forwards
its work on to another one. Typically we derive from it to modify some
its work on to another one. Typically we derive from it to modify some
functionality and forward the rest.
\class BriefCommandMessageTarget
\brief BriefCommandMessageTarget is a CommandOutputTarget that provides
status in a briefer listing
status in a briefer listing
\class LispyCommandMessageTarget
\brief LispyCommandMessageTarget is a CommandOutputTarget that provides status
\brief LispyCommandMessageTarget is a CommandOutputTarget that provides status
in a lispy style.
\class CommandOutputTargets
\brief CommandOutputTargets a mix of three output classes to output
\brief CommandOutputTargets a mix of three output classes to output
progress indication, status messages and errors.
\class BriefCommandOutputTargets
\brief BriefCommandOutputTargets is a CommandOutputTargets that replaces the
\brief BriefCommandOutputTargets is a CommandOutputTargets that replaces the
status message target with the BriefCommandMessageTarget version.
\class LispifiedCommandOutputTargets
\brief LispifiedCommandOutputTargets is a CommandOutputTargets that replaces the
\brief LispifiedCommandOutputTargets is a CommandOutputTargets that replaces the
status message target with the LispyCommandMessageTarget version.
\class ProgressToMessageTarget
Expand All @@ -59,7 +59,7 @@ and sends it to that message target.
class wxStatusBar;

/// Interface for objects that can receive command progress information
class CommandProgressTarget /* not final */
class MENUS_API CommandProgressTarget /* not final */
{
public:
virtual ~CommandProgressTarget();
Expand Down Expand Up @@ -205,7 +205,7 @@ class MENUS_API ResponseTarget final : public CommandMessageTarget
ResponseTarget()
: mSemaphore(0, 1),
mBuffer(wxEmptyString)
{
{
// Cater for handling long responses quickly.
mBuffer.Alloc(40000);
}
Expand Down Expand Up @@ -247,7 +247,7 @@ class MENUS_API CombinedMessageTarget final : public CommandMessageTarget
};


/**
/**
\class TargetFactory
\brief TargetFactory makes Command output targets.
By default, we ignore progress updates but display all other messages directly
Expand All @@ -269,8 +269,8 @@ class TargetFactory
/// Used to aggregate the various output targets a command may have.
/// Assumes responsibility for pointers passed into it.
/// mProgressTarget is a unique pointer, but mStatusTraget and
/// mErrorTarget are shared ones, because they may both point to the same
/// output
/// mErrorTarget are shared ones, because they may both point to the same
/// output
class CommandOutputTargets /* not final */
{
public:
Expand Down
2 changes: 2 additions & 0 deletions libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ StaffPadTimeAndPitch::StaffPadTimeAndPitch(
BootStretcher();
}

StaffPadTimeAndPitch::~StaffPadTimeAndPitch() = default;

void StaffPadTimeAndPitch::GetSamples(float* const* output, size_t outputLen)
{
if (!mTimeAndPitch)
Expand Down
3 changes: 3 additions & 0 deletions libraries/lib-time-and-pitch/StaffPadTimeAndPitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class TIME_AND_PITCH_API StaffPadTimeAndPitch final :
StaffPadTimeAndPitch(
int sampleRate, size_t numChannels, TimeAndPitchSource&,
const Parameters&);

~StaffPadTimeAndPitch() override;

void GetSamples(float* const*, size_t) override;

private:
Expand Down

0 comments on commit 64e9d3d

Please sign in to comment.