OpenBoard-org / OpenBoard

OpenBoard is a cross-platform interactive whiteboard application intended for use in a classroom setting.
https://openboard.ch/
GNU General Public License v3.0
2.4k stars 429 forks source link

refactor(UBPersistenceManager): Make createDocumentProxyStructure static #1047

Open Vekhir opened 3 months ago

Vekhir commented 3 months ago

The method createDocumentProxyStructure doesn't depend on the object, so can be made static. QtConcurrent::mapped requires the argument of the method to be const, since it creates a new list for the mapping.

The lambda function marks its arguments as const by default. Since the method is now static, the lambda can be replaced with a direct reference.

The removal of the lambda resolves warning 3 of #1046.