richelbilderbeek / djog_unos_2018

Project by the Uno's at DJOG 2018-2019: Nature Zen
GNU General Public License v3.0
6 stars 2 forks source link

Cleanup 'merge_tiles' #562

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

Is your feature request related to a problem? Please describe.

Currently, we have:

void game::merge_tiles() { //!OCLINT must simplify
  for (int i = 0; i < n - 1; ++i)
  {
    for (int j = i + 1; j < n; ++j)
    {
      if (/* */) { continue; }
      //...
      return; //!OCLINT I don't know an alternative;
    }
  }
}

This can be cleaned up:

Describe the solution you'd like

All tests must pass.

Describe alternatives you've considered

None.

Additional context

None.

richelbilderbeek commented 5 years ago

I see in the code:

      return; //!OCLINT I don't know an alternative;
      i = n; j = n;

OCLint will complain, as the second line is never call. I think the return can be safely removed...

Remember: all tests should keep passing :+1:

DynCoder commented 5 years ago

nonononononono, that caused a bug remember. Make sure you don't break anything

Op vr 3 mei 2019 17:58 schreef Richel Bilderbeek notifications@github.com:

I see in the code:

  return; //!OCLINT I don't know an alternative;

  i = n; j = n;

OCLint will complain, as the second line is never call. I think the return can be safely removed...

Remember: all tests should keep passing 👍

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/richelbilderbeek/djog_unos_2018/issues/562#issuecomment-489147985, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7ZHEU4TEH2M7BMKQMNSVDPTROK7ANCNFSM4HG3HBOQ .