Update double-buffer.cpp

Thank you Adams, for your suggestion on simplification to double-buffered update.