Skip to content

Commit

Permalink
baconfig: use inline constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura committed Nov 7, 2023
1 parent 5f9d8e5 commit 2d9f677
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/include/baconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void InitWinAPIWrapper();
#define AUTH_TIMEOUT 60 * 10

// Default network buffer size
#define DEFAULT_NETWORK_BUFFER_SIZE (256 * 1024)
inline constexpr std::size_t DEFAULT_NETWORK_BUFFER_SIZE = 256 * 1024;

// Tape label types -- stored in catalog
#define B_BAREOS_LABEL 0
Expand Down Expand Up @@ -249,12 +249,12 @@ typedef uint16_t slot_flags_t;

#include <limits>

constexpr slot_number_t kInvalidSlotNumber
inline constexpr slot_number_t kInvalidSlotNumber
= std::numeric_limits<slot_number_t>::max();
constexpr slot_number_t kInvalidDriveNumber
inline constexpr slot_number_t kInvalidDriveNumber
= std::numeric_limits<drive_number_t>::max();

constexpr int kInvalidFiledescriptor = -1;
inline constexpr int kInvalidFiledescriptor = -1;

inline bool IsSlotNumberValid(slot_number_t slot)
{
Expand Down

0 comments on commit 2d9f677

Please sign in to comment.