code brush

This commit is contained in:
Бычков Андрей
2022-07-01 17:30:34 +03:00
parent 2fb937a090
commit 883612e835
15 changed files with 49 additions and 260 deletions

View File

@@ -55,7 +55,6 @@ bool BlockViewWavetrace::trace(const QPoint & start, const QPoint & finish) {
fn = finish;
if (dir_ == NoTrace) return true;
//qDebug() << "trace" << start << finish;
//return true;
short cl = 0;
QRect frect(0, 0, wid - 1, hei - 1);
QVector<QPoint> cpnts, npnts;
@@ -103,7 +102,6 @@ void BlockViewWavetrace::gatherPath() {
short cl = field[fn.x()][fn.y()].value;
QRect frect(0, 0, wid, hei);
QPoint cpnt = fn;
//cout << "start from " << cl << endl;
auto checkAndStep = [this, &cpnt, &first, &frect] (int dir, short c, int & ca_, int pa_)->bool {
int cx = cpnt.x() + dps[dir].x();
int cy = cpnt.y() + dps[dir].y();
@@ -137,7 +135,6 @@ void BlockViewWavetrace::gatherPath() {
}
path_.push_front(st);
//cout << path_.size() << endl;
}
@@ -159,9 +156,5 @@ void BlockViewWavetrace::setPreferredDirection(BlockViewWavetrace::Direction dir
const QVector<QPoint> & BlockViewWavetrace::path() const {
/*path_.resize(3);
path_[0] = st;
path_[1] = (st + fn) / 2;
path_[2] = fn;*/
return path_;
}