mariusbancila / stduuid

A C++17 cross-platform implementation for UUIDs
MIT License
742 stars 112 forks source link

Added Appropriate nodiscards #61

Closed NovaSmoof closed 2 years ago

NovaSmoof commented 2 years ago

Hey I was using the library and accidentally perform an error with uuid::from_string function. I would have caught the error if the function was [[nodiscard]]. So I added [[nodiscard]] to all functions that seemed appropriate.

I didn't add it to the random generator function because for some reason someone may just want to cycle random numbers out of no where. Don't really know why, but I wasn't 100% sure so I didn't add it there.

I also may have horribly messed up the spacing on things. Apologies, I have class in 10 minutes and I will definitely forget about this entire thing by the end of it.

NovaSmoof commented 2 years ago

I just performed a change that undid the changes to spacing I did. Everything that should be [[nodiscard]] should still be be no discard.