Allow compiling client-side with GCC (#2056)
* Allow compiling client-side with GCC * Merge branch 'master' into nsubiron/gcc
This commit is contained in:
parent
7e7f989606
commit
b45f7c5f95
|
@ -4,8 +4,8 @@ BINDIR=$(CURDIR)/bin
|
|||
INSTALLDIR=$(CURDIR)/libcarla-install
|
||||
TOOLCHAIN=$(CURDIR)/ToolChain.cmake
|
||||
|
||||
CC=/usr/bin/clang-7
|
||||
CXX=/usr/bin/clang++-7
|
||||
CC=/usr/bin/gcc-7
|
||||
CXX=/usr/bin/g++-7
|
||||
CXXFLAGS=-std=c++14 -pthread -fPIC -O3 -DNDEBUG -Werror -Wall -Wextra
|
||||
|
||||
define log
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#if defined(_MSC_VER)
|
||||
# define LIBCARLA_FORCEINLINE __forceinline
|
||||
# define LIBCARLA_NOINLINE __declspec(noinline)
|
||||
#elif defined(__clang__)
|
||||
#elif defined(__clang__) || defined(__GNUC__)
|
||||
# if defined(NDEBUG)
|
||||
# define LIBCARLA_FORCEINLINE inline __attribute__((always_inline))
|
||||
# else
|
||||
|
|
|
@ -48,12 +48,12 @@ namespace detail {
|
|||
"exception thrown while trying to garbage collect Actor",
|
||||
ptr->GetDisplayId(),
|
||||
e.what());
|
||||
throw; // calls terminate.
|
||||
std::terminate();
|
||||
} catch (...) {
|
||||
log_critical(
|
||||
"unknown exception thrown while trying to garbage collect an Actor :",
|
||||
ptr->GetDisplayId());
|
||||
throw; // calls terminate.
|
||||
std::terminate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,8 @@ namespace detail {
|
|||
|
||||
protected:
|
||||
|
||||
explicit ActorState(rpc::Actor description, EpisodeProxy episode);
|
||||
|
||||
const geom::BoundingBox &GetBoundingBox() const {
|
||||
return _description.bounding_box;
|
||||
}
|
||||
|
@ -75,8 +77,6 @@ namespace detail {
|
|||
|
||||
friend class Simulator;
|
||||
|
||||
explicit ActorState(rpc::Actor description, EpisodeProxy episode);
|
||||
|
||||
rpc::Actor _description;
|
||||
|
||||
EpisodeProxy _episode;
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace s11n {
|
|||
}
|
||||
|
||||
void SetHorizontalAngle(float angle) {
|
||||
_header[Index::HorizontalAngle] = reinterpret_cast<const uint32_t &>(angle);
|
||||
std::memcpy(&_header[Index::HorizontalAngle], &angle, sizeof(uint32_t));
|
||||
}
|
||||
|
||||
uint32_t GetChannelCount() const {
|
||||
|
|
Loading…
Reference in New Issue