Информация об изменениях

Сообщение Re: Оцените качество кода на С++ от 18.09.2014 9:58

Изменено 18.09.2014 10:01 niXman

в общем, довольно не плохо с первого взгляда, видал и похуже %)
"порадовало" использование запятой:
if (basepoint == 0)
  Points.push_back(mpMathPoint.x), Points.push_back(mpMathPoint.y),
  Points.push_back(right2X), Points.push_back(right2Y);
else if (basepoint == basepoint_count - 1 && closed_path == false)
  Points.push_back(left2X), Points.push_back(left2Y),
  Points.push_back(mpMathPoint.x), Points.push_back(mpMathPoint.y);
else
  Points.push_back(left2X), Points.push_back(left2Y),
  Points.push_back(mpMathPoint.x), Points.push_back(mpMathPoint.y),
  Points.push_back(mpMathPoint.x), Points.push_back(mpMathPoint.y),   // doubling inner point!
  Points.push_back(right2X), Points.push_back(right2Y),
  Weights.push_back(1.0), Weights.push_back(1.0);   // doubling inner point!
Re: Оцените качество кода на С++
в общем, довольно не плохо с первого взгляда, видал и похуже %)
"порадовало" использование запятой:
if (basepoint == 0)
  Points.push_back(mpMathPoint.x),
  Points.push_back(mpMathPoint.y),
  Points.push_back(right2X),
  Points.push_back(right2Y);
else if (basepoint == basepoint_count - 1 && closed_path == false)
  Points.push_back(left2X),
  Points.push_back(left2Y),
  Points.push_back(mpMathPoint.x),
  Points.push_back(mpMathPoint.y);
else
  Points.push_back(left2X),
  Points.push_back(left2Y),
  Points.push_back(mpMathPoint.x),
  Points.push_back(mpMathPoint.y),
  Points.push_back(mpMathPoint.x),
  Points.push_back(mpMathPoint.y),   // doubling inner point!
  Points.push_back(right2X),
  Points.push_back(right2Y),
  Weights.push_back(1.0),
  Weights.push_back(1.0);   // doubling inner point!