Cinder icon indicating copy to clipboard operation
Cinder copied to clipboard

Added noexcept to signals move constructors and assignment operators.

Open richardeakin opened this issue 5 years ago • 2 comments

This will allow std::vector<Connection> and std::vector<ScopedConnection> to resize a little more efficiently. Was only waiting until our minimum compiler on MSW was v140 which is now the case.

Fixes #1681. That issue is marked for 0.9.2 milestone, although this is a pretty minor modification so it can be merged before or after that lands.

richardeakin avatar Jan 07 '20 05:01 richardeakin

Looks good to me.

Best I can tell, you could also add noexcept to all other constructors and assignment operators of connection and ScopedConnection while you are at it, but I'd only do that if you want to commit to keep them noexcept in the future (I think that would be a reasonable choice, but it doesn't really matter all that much).

MikeGitb avatar Feb 11 '20 10:02 MikeGitb

I suppose we can, if for nothing else than congruity. There shouldn't be any exceptions in this code except with the possibility of Signal::emit().

richardeakin avatar Feb 18 '20 01:02 richardeakin