Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(669)

Unified Diff: lily/side-position-interface.cc

Issue 579240043: Issue 4550: Avoid "using namespace std;" in included files (Take 2) (Closed)
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lily/side-position-interface.cc
diff --git a/lily/side-position-interface.cc b/lily/side-position-interface.cc
index 762d9ade3506989627df89e80a2eb99f2476037d..d540b12bff6e472a1491b32d78386bea8a45dfa5 100644
--- a/lily/side-position-interface.cc
+++ b/lily/side-position-interface.cc
@@ -24,7 +24,6 @@
#include <set>
#include <map>
-using namespace std;
#include "accidental-interface.hh"
#include "accidental-placement.hh"
@@ -49,6 +48,10 @@ using namespace std;
#include "warn.hh"
#include "unpure-pure-container.hh"
+using std::set;
+using std::string;
+using std::vector;
+
void
Side_position_interface::add_support (Grob *me, Grob *e)
{
@@ -357,7 +360,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
total_off = minimum_space * dir;
if (current_off)
- total_off = dir * max (dir * total_off,
+ total_off = dir * std::max (dir * total_off,
dir * (*current_off));
/* FIXME: 1000 should relate to paper size. */
@@ -416,7 +419,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
Real diff = (dir * staff_extent[dir] + staff_padding
- dir * total_off
+ dir * (staff_position - parent_position));
- total_off += dir * max (diff, 0.0);
+ total_off += dir * std::max (diff, 0.0);
}
}
return scm_from_double (total_off);

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b