Skip to content

Commit

Permalink
Style cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Jan 19, 2025
1 parent 2ced999 commit 3e3dc6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions source_common/comms/comms_interface.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: MIT
* ----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited
* Copyright (c) 2024-2025 Arm Limited
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -63,7 +63,7 @@ static const EndpointID NO_ENDPOINT { 0 };
class CommsInterface
{
public:
virtual ~CommsInterface() { }
virtual ~CommsInterface() = default;

/**
* @brief Is this comms module connected to a host server?
Expand Down
5 changes: 3 additions & 2 deletions source_common/framework/manual_functions.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: MIT
* ----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited
* Copyright (c) 2024-2025 Arm Limited
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -297,7 +297,8 @@ PFN_vkVoidFunction layer_vkGetInstanceProcAddr_default(
// Otherwise, only expose functions that the driver exposes to avoid
// changing queryable interface behavior seen by the application
layerFunction = getInstanceLayerFunction(pName);
if (instance) {
if (instance)
{
std::unique_lock<std::mutex> lock { g_vulkanLock };
auto* layer = Instance::retrieve(instance);

Expand Down
10 changes: 6 additions & 4 deletions source_common/utils/queue.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* SPDX-License-Identifier: MIT
* ----------------------------------------------------------------------------
* Copyright (c) 2024 Arm Limited
* Copyright (c) 2024-2025 Arm Limited
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
Expand Down Expand Up @@ -44,20 +44,22 @@ class Task
/**
* @brief Destroy the task.
*/
virtual ~Task() { }
virtual ~Task() = default;

/**
* @brief Wait for the task to be complete.
*/
void wait() {
void wait()
{
std::unique_lock<std::mutex> lock(condition_lock);
complete_condition.wait(lock, [this]{ return complete.load(); });
}

/**
* @brief Notify that the task is complete.
*/
void notify() {
void notify()
{
std::unique_lock<std::mutex> lock(condition_lock);
complete = true;
lock.unlock();
Expand Down

0 comments on commit 3e3dc6a

Please sign in to comment.