Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Git Dependency Management Workshop
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mohness Waizy
Git Dependency Management Workshop
Commits
167cbe92
There was an error fetching the commit references. Please try again later.
Commit
167cbe92
authored
Nov 18, 2019
by
Dominik S. Buse
Browse files
Options
Downloads
Patches
Plain Diff
Cool patches.
parent
f9b9fddf
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/0001-Smarter-Code.patch
+41
-0
41 additions, 0 deletions
patches/0001-Smarter-Code.patch
with
41 additions
and
0 deletions
patches/0001-Smarter-Code.patch
0 → 100644
+
41
−
0
View file @
167cbe92
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment