Skip to content

Commit

Permalink
Merge pull request #4884 from RosettaCommons/JackMaguire/Wcomma
Browse files Browse the repository at this point in the history
Adding -Wcomma to clang build

Old repository SHA1: 2f54d0dfac311a6b28e52a08a8ff70613dc7c919
  • Loading branch information
JackMaguire authored Aug 19, 2020
1 parent 0827893 commit 6fd5bad
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 29 deletions.
3 changes: 2 additions & 1 deletion source/src/apps/pilot/frank/cryst_design.cc
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ class CrystDesign : public protocols::moves::Mover {

DDG_CUT_ = -10.0;
WEAKE_CUT_ = -5.0;
WFY_MUT_CUT_ = 1, M_MUT_CUT_ = 1;
WFY_MUT_CUT_ = 1;
M_MUT_CUT_ = 1;
UNSATS_SOFT_CUT_ = 2.5;
UNSATS_CUT_ = 1.1;
SC_CUT_ = 0.4;
Expand Down
48 changes: 24 additions & 24 deletions source/test/numeric/xyz.functions.cxxtest.hh
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 0.0, delta_percent );

// Compound
A1.assign(1,0,0), B1.assign( 0,1,0 );
A2.assign(0,1,0), B2.assign( 0,0,1 );
A1.assign(1,0,0); B1.assign( 0,1,0 );
A2.assign(0,1,0); B2.assign( 0,0,1 );

rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2);
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -395,8 +395,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 1.0, delta_percent );

// different lengths
A1.assign(1,0,0), B1.assign( 0,1,0 );
A2.assign(0,2,0), B2.assign( 0,0,2 );
A1.assign(1,0,0); B1.assign( 0,1,0 );
A2.assign(0,2,0); B2.assign( 0,0,2 );

rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2);
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -409,8 +409,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 1.0, delta_percent );

// A1 is zero
A1.assign(0,0,0), B1.assign( 0.5,0.5,0.5 );
A2.assign(-1e-7,1e-7,-1e-7), B2.assign( -1,1,-1 );
A1.assign(0,0,0); B1.assign( 0.5,0.5,0.5 );
A2.assign(-1e-7,1e-7,-1e-7); B2.assign( -1,1,-1 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -423,8 +423,8 @@ public:
TS_ASSERT_DELTA( B3.z(), -0.5, delta_percent );

// A2 is zero
A1.assign(1e-7,0,0), B1.assign( 0,1,0 );
A2.assign(0,0,0), B2.assign( 0,0,2 );
A1.assign(1e-7,0,0); B1.assign( 0,1,0 );
A2.assign(0,0,0); B2.assign( 0,0,2 );

rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2);
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -437,8 +437,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 1.0, delta_percent );

// Coincident vectors
A1.assign(1,1,1), B1.assign( 0.5,0.5,0.5 );
A2.assign(-2,2,-2), B2.assign( -1,1,-1 );
A1.assign(1,1,1); B1.assign( 0.5,0.5,0.5 );
A2.assign(-2,2,-2); B2.assign( -1,1,-1 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -451,8 +451,8 @@ public:
TS_ASSERT_DELTA( B3.z(), -0.5, delta_percent );

// Opposite but unequal
A1.assign(1,1,1), B1.assign( -0.5,-0.5,-0.5 );
A2.assign(-2,2,-2), B2.assign( 1,-1,1 );
A1.assign(1,1,1); B1.assign( -0.5,-0.5,-0.5 );
A2.assign(-2,2,-2); B2.assign( 1,-1,1 );

rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2);
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -465,8 +465,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 0.5, delta_percent );

// Source equal and opposite
A1.assign(1,-1,1), B1.assign( -1,1,-1 );
A2.assign(2,0,2), B2.assign( -2,1e-5,-2 );
A1.assign(1,-1,1); B1.assign( -1,1,-1 );
A2.assign(2,0,2); B2.assign( -2,1e-5,-2 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -479,8 +479,8 @@ public:
TS_ASSERT_DELTA( B3.z(), -1.22474487139, delta_percent );

// target equal and opposite
A1.assign(1.41421356237,0,1e-5), B1.assign( -1.41421356237,1e-5,0 );
A2.assign(0,1,-1), B2.assign( 0,-1,1 );
A1.assign(1.41421356237,0,1e-5); B1.assign( -1.41421356237,1e-5,0 );
A2.assign(0,1,-1); B2.assign( 0,-1,1 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -493,8 +493,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 1.0, delta_percent );

// Both Equal and opposite
A1.assign(1,-1,1), B1.assign( -1,1,-1 );
A2.assign(2,2,-2), B2.assign( -2,-2,2 );
A1.assign(1,-1,1); B1.assign( -1,1,-1 );
A2.assign(2,2,-2); B2.assign( -2,-2,2 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -507,8 +507,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 1.0, delta_percent );

// Almost but not quite opposite
A1.assign(1,-1,1+1e-5), B1.assign( -1,1,-1 );
A2.assign(2+1e-5,2,0), B2.assign( -2,-2+1e-5,0 );
A1.assign(1,-1,1+1e-5); B1.assign( -1,1,-1 );
A2.assign(2+1e-5,2,0); B2.assign( -2,-2+1e-5,0 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -525,8 +525,8 @@ public:
*/

// Two zeros, source
A1.assign(0,0,0), B1.assign( 0,0,0 );
A2.assign(1,2,3), B2.assign( 3,1,4 );
A1.assign(0,0,0); B1.assign( 0,0,0 );
A2.assign(1,2,3); B2.assign( 3,1,4 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand All @@ -539,8 +539,8 @@ public:
TS_ASSERT_DELTA( B3.z(), 0.0, delta_percent );

// Two zeros, destination -- do nothing
A1.assign(1,2,3), B1.assign( 3,1,4 );
A2.assign(0,0,0), B2.assign( 0,0,0 );
A1.assign(1,2,3); B1.assign( 3,1,4 );
A2.assign(0,0,0); B2.assign( 0,0,0 );

TS_ASSERT_THROWS_NOTHING( rot_matrix = numeric::alignVectorSets(A1,B1,A2,B2) );
A3 = rot_matrix * A1; B3 = rot_matrix * B1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public:

//set up the Neighborhood calculators (testing each constructor type)
std::set< core::Size > crset;
crset.insert(213); crset.insert(204), crset.insert(265);
crset.insert(213); crset.insert(204); crset.insert(265);
core::pose::metrics::CalculatorFactory::Instance().register_calculator( "nh_crset_calc", utility::pointer::make_shared< protocols::pose_metric_calculators::NeighborhoodByDistanceCalculator >(crset) );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public:
void test_RestrictToNeighborhoodOperation() {

std::set< core::Size > crset;
crset.insert(77); crset.insert(215), crset.insert(45); //surface, interface, buried residues to test
crset.insert(77); crset.insert(215); crset.insert(45); //surface, interface, buried residues to test

using namespace core::pack::task;
using protocols::task_operations::RestrictToNeighborhoodOperation;
Expand All @@ -129,7 +129,7 @@ public:
//first we set up the calculators that the Operation will use
std::string const interface_calc("interface"), neighborhood_calc("neighborhood");
std::set< core::Size > crset_RBC;
crset_RBC.insert(127); crset_RBC.insert(170), crset_RBC.insert(46);
crset_RBC.insert(127); crset_RBC.insert(170); crset_RBC.insert(46);
core::pose::metrics::CalculatorFactory::Instance().register_calculator( interface_calc, utility::pointer::make_shared< core::pose::metrics::simple_calculators::InterfaceNeighborDefinitionCalculator >( core::Size(1), core::Size(2) ) );
core::pose::metrics::CalculatorFactory::Instance().register_calculator( neighborhood_calc, utility::pointer::make_shared< protocols::pose_metric_calculators::NeighborhoodByDistanceCalculator >( crset_RBC ) );

Expand Down
6 changes: 5 additions & 1 deletion source/test/util/rosettascripts.hh
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,11 @@ public:
{}
FilterOP clone() const { return utility::pointer::make_shared< StubMultiFilter >( *this ); }
FilterOP fresh_instance() const { return utility::pointer::make_shared< StubMultiFilter >(); }
void set( utility::vector1<core::Real> const & values, bool truth=true, std::string tag="") { values_ = values, truth_ = truth; tag_ = tag; }
void set( utility::vector1<core::Real> const & values, bool truth=true, std::string tag="") {
values_ = values;
truth_ = truth;
tag_ = tag;
}
void push_back( core::Real value ) { values_.push_back( value); }
void set_pos( core::Size pos = 1) { pos_ = pos; }
bool apply( core::pose::Pose const & ) const { return truth_; }
Expand Down
6 changes: 6 additions & 0 deletions source/tools/build/basic.settings
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand All @@ -2065,6 +2066,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand All @@ -2075,6 +2077,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand All @@ -2085,6 +2088,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand All @@ -2095,6 +2099,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand All @@ -2105,6 +2110,7 @@ settings = {
"appends" : {
"flags" : {
"warn" : [
"Wcomma",
"Winconsistent-missing-override",
],
},
Expand Down

0 comments on commit 6fd5bad

Please sign in to comment.