yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots

Home Page:https://yourWaifu.github.io/sleepy-discord/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Const reference instead of copying?

fleshka4 opened this issue · comments

Why we have to copy each of these positions? We are using C++ to have a better performance. Let's replace it with const references

virtual void onServer (Server server );

Have you tested if it makes a difference? And besides, in most cases, it's meant to move the objects. I think it's better, I start use std::move to make that more clear.