Skip to content
Snippets Groups Projects
Commit 167cbe92 authored by Dominik S. Buse's avatar Dominik S. Buse
Browse files

Cool patches.

parent f9b9fddf
No related branches found
No related tags found
No related merge requests found
From ebfcc47b99376658fa641e5fcb79794fe618ef92 Mon Sep 17 00:00:00 2001
From: "Dominik S. Buse" <buse@ccs-labs.org>
Date: Mon, 18 Nov 2019 12:39:07 +0100
Subject: [PATCH] Smarter Code!
---
lib/veins/src/veins/base/phyLayer/BasePhyLayer.cc | 7 ++-----
src/test.cc | 5 +++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/veins/src/veins/base/phyLayer/BasePhyLayer.cc b/lib/veins/src/veins/base/phyLayer/BasePhyLayer.cc
index d892355f..745b0ca7 100644
--- a/lib/veins/src/veins/base/phyLayer/BasePhyLayer.cc
+++ b/lib/veins/src/veins/base/phyLayer/BasePhyLayer.cc
@@ -505,11 +505,8 @@ void BasePhyLayer::handleUpperMessage(cMessage* msg)
// Prepare a POA object and attach it to the created Airframe
AntennaPosition pos = antennaPosition;
Coord orient = antennaHeading.toCoord();
- POA* poa = new POA(pos, orient, antenna);
- frame->setPoa(*poa);
- // the frame is now owner of the POA object
- delete poa;
- poa = nullptr;
+ POA poa(pos, orient, antenna);
+ frame->setPoa(poa);
// make sure there is no self message of kind TX_OVER scheduled
// and schedule the actual one
diff --git a/src/test.cc b/src/test.cc
index e69de29b..0a27dc13 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -0,0 +1,5 @@
+#include <string>
+
+int foo() {
+ return 42;
+}
--
2.24.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment