Skip to content

Commit

Permalink
maintenance: remove unused capture, member, and argument (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
VDanielEdwards authored Oct 28, 2024
1 parent 473dec7 commit f3d05c2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions SilKit/IntegrationTests/ITest_MessageAggregation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ TEST_F(ITest_MessageAggregation, timeout_in_case_of_deadlock_when_using_async_si
});

timeSyncService->SetSimulationStepHandlerAsync(
[dataPublisher, lifecycleService, timeSyncService, &msgReceived](std::chrono::nanoseconds /*now*/,
std::chrono::nanoseconds /*duration*/) {
[dataPublisher, lifecycleService, &msgReceived](std::chrono::nanoseconds /*now*/,
std::chrono::nanoseconds /*duration*/) {
// send ping
std::vector<uint8_t> ping(1, '?');
dataPublisher->Publish(std::move(ping));
Expand Down
3 changes: 1 addition & 2 deletions SilKit/source/core/participant/Participant_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ void Participant<SilKitConnectionT>::SetupMetrics()
SilKit::Config::InternalController config;
config.name = "MetricsReceiver";
config.network = "default";
CreateController<VSilKit::MetricsReceiver>(config, std::move(supplementalData), true, true, *_logger,
processor);
CreateController<VSilKit::MetricsReceiver>(config, std::move(supplementalData), true, true, processor);
}
}

Expand Down
2 changes: 1 addition & 1 deletion SilKit/source/core/vasio/VAsioRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ void VAsioRegistry::SetupMetrics()

if (_vasioConfig->experimental.metrics.collectFromRemote)
{
auto metricsReceiver = std::make_unique<VSilKit::MetricsReceiver>(nullptr, *_logger, processor);
auto metricsReceiver = std::make_unique<VSilKit::MetricsReceiver>(nullptr, processor);

SilKit::Core::SupplementalData supplementalData;
supplementalData[SilKit::Core::Discovery::controllerType] =
Expand Down
6 changes: 2 additions & 4 deletions SilKit/source/services/metrics/MetricsReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ namespace Log = SilKit::Services::Logging;
namespace VSilKit {


MetricsReceiver::MetricsReceiver(SilKit::Core::IParticipantInternal *, SilKit::Services::Logging::ILogger &logger,
IMetricsReceiverListener &listener)
: _logger{&logger}
, _listener{&listener}
MetricsReceiver::MetricsReceiver(SilKit::Core::IParticipantInternal *, IMetricsReceiverListener &listener)
: _listener{&listener}
{
_serviceDescriptor.SetNetworkName("default");
}
Expand Down
4 changes: 1 addition & 3 deletions SilKit/source/services/metrics/MetricsReceiver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class MetricsReceiver
, public SilKit::Core::IServiceEndpoint
{
public:
MetricsReceiver(SilKit::Core::IParticipantInternal*, SilKit::Services::Logging::ILogger& logger,
IMetricsReceiverListener& listener);
MetricsReceiver(SilKit::Core::IParticipantInternal*, IMetricsReceiverListener& listener);

// NB: The first constructor argument is present to enable using the CreateController function template. It is
// allowed to be nullptr.
Expand All @@ -40,7 +39,6 @@ class MetricsReceiver
auto GetServiceDescriptor() const -> const SilKit::Core::ServiceDescriptor& override;

private:
SilKit::Services::Logging::ILogger* _logger{nullptr};
IMetricsReceiverListener* _listener{nullptr};

SilKit::Core::ServiceDescriptor _serviceDescriptor;
Expand Down
1 change: 0 additions & 1 deletion SilKit/source/services/orchestration/TimeSyncService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ class TimeSyncService

std::vector<std::string> _requiredParticipants;

bool _isRunning{false};
bool _isSynchronizingVirtualTime{false};
bool _timeSyncConfigured{false};

Expand Down

0 comments on commit f3d05c2

Please sign in to comment.