You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to mention: You can see the same happening with the GitHub syntax coloring when you click on your link provided above.
The highlighter gets confused with your coding style (and me too). Your code is hard to read because of your style where you place the parantheses and curly braces and your indentations.
Your code:
publicvoidcopy
(DList<T> list)
{
if (list == null)
thrownewNullPointerException
("DList.copy(): list is null");
clear();
DListEntry<T> p = list.first();
while (p != null)
{
addLast (p.item);
p = p.succ();
}
}
How I would format it:
publicvoidcopy(DList<T> list) {
if (list == null) {
thrownewNullPointerException("DList.copy(): list is null");
}
clear();
DListEntry<T> p = list.first();
while (p != null) {
addLast (p.item);
p = p.succ();
}
}
Your coding style breaks multiple syntax highlighters. I suggest you to consider rethinking your coding style for better readability and less syntax highlighter problems.
https://github.com/zg/pj2/blob/master/lib/edu/rit/util/DList.java
I don't know what's wrong here, but at line 148, the syntax highlighter breaks and everything gets painted blue past that line.
The text was updated successfully, but these errors were encountered: