Skip to content

Commit

Permalink
[C++]: Disable bounds checks for release builds of media driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeb01 committed Jul 5, 2016
1 parent a93ca0e commit 14f2411
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions aeron-driver/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ SET(HEADERS
add_library(aeron_driver ${SOURCE} ${HEADERS})
add_executable(MediaDriver MediaDriverMain.cpp)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDISABLE_BOUNDS_CHECKS")

target_link_libraries(
aeron_driver
aeron_client
Expand Down
4 changes: 3 additions & 1 deletion aeron-driver/src/main/cpp/status/SystemCounters.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef AERON_SYSTEMCOUNTERS_H
#define AERON_SYSTEMCOUNTERS_H

#include <unordered_map>

#include <concurrent/AtomicCounter.h>
#include <concurrent/CountersManager.h>
#include <util/Exceptions.h>
Expand All @@ -43,7 +45,7 @@ class SystemCounters
SOURCEINFO);
}

counts[i++] = descriptor.newCounter(counterManager);
counts[descriptor.id()] = descriptor.newCounter(counterManager);
}
}

Expand Down

0 comments on commit 14f2411

Please sign in to comment.