Skip to content

Commit

Permalink
Ran clang-tidy on code
Browse files Browse the repository at this point in the history
  • Loading branch information
bengineerd committed Oct 16, 2024
1 parent d64c015 commit 63b9334
Show file tree
Hide file tree
Showing 148 changed files with 283 additions and 533 deletions.
6 changes: 3 additions & 3 deletions include/rogue/Directives.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_DIRECTIVES_H__
#define __ROGUE_DIRECTIVES_H__
#ifndef ROGUE_DIRECTIVES_H
#define ROGUE_DIRECTIVES_H

#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define PY_SSIZE_T_CLEAN
Expand All @@ -24,7 +24,7 @@
#define CRCPP_USE_CPP11

#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#define STDC_FORMAT_MACROS
#endif

#endif
4 changes: 2 additions & 2 deletions include/rogue/EnableSharedFromThis.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_ENABLE_SHARED_FROM_THIS_H__
#define __ROGUE_ENABLE_SHARED_FROM_THIS_H__
#ifndef ROGUE_ENABLESHAREDFROMTHIS_H
#define ROGUE_ENABLESHAREDFROMTHIS_H
#include "rogue/Directives.h"

#include <memory>
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/GeneralError.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_GENERAL_ERROR_H__
#define __ROGUE_GENERAL_ERROR_H__
#ifndef ROGUE_GENERALERROR_H
#define ROGUE_GENERALERROR_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <exception>
#include <memory>
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/GilRelease.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_GIL_RELEASE_H__
#define __ROGUE_GIL_RELEASE_H__
#ifndef ROGUE_GILRELEASE_H
#define ROGUE_GILRELEASE_H
#include "rogue/Directives.h"

#include <stdint.h>
#ifndef NO_PYTHON
#include <boost/python.hpp>
#endif
Expand Down
6 changes: 3 additions & 3 deletions include/rogue/Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_HELPERS_H__
#define __ROGUE_HELPERS_H__
#ifndef ROGUE_HELPERS_H
#define ROGUE_HELPERS_H
#include "rogue/Directives.h"

// Connect stream
Expand All @@ -27,7 +27,7 @@
// Connect stream bi-directionally
#define rogueStreamConnectBiDir(devA, devB) \
devA->addSlave(devB); \
devB->addSlave(devA);
(devB)->addSlave(devA);

// Connect memory bus
#define rogueBusConnect(src, dst) src->setSlave(dst);
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_LOGGING_H__
#define __ROGUE_LOGGING_H__
#ifndef ROGUE_LOGGING_H
#define ROGUE_LOGGING_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <exception>
#include <memory>
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/Queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_QUEUE_H__
#define __ROGUE_QUEUE_H__
#ifndef ROGUE_QUEUE_H
#define ROGUE_QUEUE_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <condition_variable>
#include <mutex>
Expand Down
4 changes: 2 additions & 2 deletions include/rogue/ScopedGil.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_SCOPED_GIL_H__
#define __ROGUE_SCOPED_GIL_H__
#ifndef ROGUE_SCOPEDGIL_H
#define ROGUE_SCOPEDGIL_H

#include "rogue/Directives.h"
#ifndef NO_PYTHON
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_VERSION_H__
#define __ROGUE_VERSION_H__
#ifndef ROGUE_VERSION_H
#define ROGUE_VERSION_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <string>

Expand Down
5 changes: 2 additions & 3 deletions include/rogue/hardware/MemMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_HARDWARE_MEM_MAP_H__
#define __ROGUE_HARDWARE_MEM_MAP_H__
#ifndef ROGUE_HARDWARE_MEMMAP_H
#define ROGUE_HARDWARE_MEMMAP_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <memory>
#include <mutex>
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/hardware/axi/AxiMemMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_HARDWARE_AXI_MEM_MAP_H__
#define __ROGUE_HARDWARE_AXI_MEM_MAP_H__
#ifndef ROGUE_HARDWARE_AXI_AXIMEMMAP_H
#define ROGUE_HARDWARE_AXI_AXIMEMMAP_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <memory>
#include <mutex>
Expand Down
5 changes: 2 additions & 3 deletions include/rogue/hardware/axi/AxiStreamDma.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__
#define __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__
#ifndef ROGUE_HARDWARE_AXI_AXISTREAMDMA_H
#define ROGUE_HARDWARE_AXI_AXISTREAMDMA_H
#include "rogue/Directives.h"

#include <stdint.h>

#include <map>
#include <memory>
Expand Down
4 changes: 2 additions & 2 deletions include/rogue/hardware/axi/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* contained in the LICENSE.txt file.
* ----------------------------------------------------------------------------
**/
#ifndef __ROGUE_HARDWARE_AXI_MODULE_H__
#define __ROGUE_HARDWARE_AXI_MODULE_H__
#ifndef ROGUE_HARDWARE_AXI_MODULE_H
#define ROGUE_HARDWARE_AXI_MODULE_H
#include "rogue/Directives.h"

namespace rogue {
Expand Down
8 changes: 4 additions & 4 deletions include/rogue/hardware/drivers/AxisDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* ----------------------------------------------------------------------------
**/

#ifndef __ASIS_DRIVER_H__
#define __ASIS_DRIVER_H__
#ifndef ROGUE_HARDWARE_DRIVERS_AXISDRIVER_H
#define ROGUE_HARDWARE_DRIVERS_AXISDRIVER_H
#include "DmaDriver.h"

// Command definitions
Expand All @@ -41,7 +41,7 @@
* @return The combined flags value.
*/
static inline uint32_t axisSetFlags(uint32_t fuser, uint32_t luser, uint32_t cont) {
uint32_t flags;
uint32_t flags = 0;

// Set flags based on input parameters, ensuring each is in its correct position
flags = fuser & 0xFF; // First user-defined flag
Expand Down Expand Up @@ -103,4 +103,4 @@ static inline void axisWriteReqMissed(int32_t fd) {
}

#endif // !DMA_IN_KERNEL
#endif // __ASIS_DRIVER_H__
#endif // ROGUE_HARDWARE_DRIVERS_AXISDRIVER_H
Loading

0 comments on commit 63b9334

Please sign in to comment.