[Github-comments] [geany/geany] Push current position to navqueue before navigating back (#1537)

Matthew Brush notifications at xxxxx
Sat Jul 15 00:08:25 UTC 2017


> I still do not quite understand how an assertion would be useful here, so I chose not to add it; hope that’s OK.

As I said, I don't think the `NULL` check for `doc` is even harmful (ie. the original code was fine), but @kugel- didn't think it was necessary and you did. An assertion here gives the best of both cases, it checks the precondition you were checking originally (in case a caller calls it with no documents open), but it compiles away to nothing for release builds since it's impossible to fire during a correct run (ie. the GUI prevents it). For more information [see here](https://en.wikipedia.org/wiki/Assertion_(software_development)#Assertions_during_the_development_cycle)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1537#issuecomment-315494677
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170714/0f42464c/attachment.html>


More information about the Github-comments mailing list