[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2)
From: |
David Kastrup |
Subject: |
Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden) |
Date: |
Sat, 25 Jan 2020 13:26:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
address@hidden writes:
> On 2020/01/24 15:26:06, dak wrote:
>
> What I meant to say: I guess I should be able to handle those
> comparatively obvious merge conflicts.
>
> https://codereview.appspot.com/579240043/
But frankly, I have not been reckoning with having to deal with the ilk
of
commit 6f4128e1f359daf38a3caf2c0e4ad68e16c10540
Author: Dan Eble <address@hidden>
Date: Thu Jan 9 13:04:18 2020 -0500
Issue 4550/2: Avoid "using namespace std;" in included files
These are manual changes in preparation for an automated removal of
"using namespace std;".
Mostly, these are additions of using-declarations for commonly used
types and containers (e.g. std::string, std::vector) to *.cc files so
that they will continue to build after the big removal.
diff --git a/lily/slur-scoring.cc b/lily/slur-scoring.cc
index bb779a040e..262b41a677 100644
--- a/lily/slur-scoring.cc
+++ b/lily/slur-scoring.cc
@@ -45,6 +45,9 @@
#include "stem.hh"
#include "warn.hh"
+using std::string;
+using std::vector;
+
/*
TODO:
@@ -122,12 +125,12 @@ Slur_score_state::get_encompass_info (Grob *col) const
if (Grob *head = Note_column::first_head (col))
{
- Interval hex = head->extent (common_[X_AXIS], X_AXIS);
+ Interval head_ext = head->extent (common_[X_AXIS], X_AXIS);
// FIXME: Is there a better option than setting to 0?
- if (hex.is_empty ())
+ if (head_ext.is_empty ())
ei.x_ = 0;
else
- ei.x_ = hex.center ();
+ ei.x_ = head_ext.center ();
}
else
ei.x_ = col->extent (common_[X_AXIS], X_AXIS).center ();
That last part applies part of a patch from an unrelated issue of
Han-Wen. Please don't do stuff like that, if necessary using
git reset --hard
Took me about half an hour of head-scratching to figure out why the
diffs would differ here.
--
David Kastrup
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), (continued)
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), lemzwerg, 2020/01/23
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), nine . fierce . ballads, 2020/01/24
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), jonas . hahnfeld, 2020/01/24
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), dak, 2020/01/24
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), nine . fierce . ballads, 2020/01/24
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), dak, 2020/01/24
- Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), dak, 2020/01/24
Re: Issue 4550: Avoid "using namespace std; " in included files (Take 2) (issue 579240043 by address@hidden), jonas . hahnfeld, 2020/01/24