Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a move constructor to Database #157

Merged
merged 1 commit into from
Feb 13, 2019
Merged

Conversation

hubslave
Copy link
Contributor

This makes it possible to e.g. return Databases from functions. Gated behind a __cplusplus >= 201103L check for compatibility with older C++ versions. Defined inline due to its triviality and in order to avoid having to do the same preprocessor dance in two places.

Despite setting mpSQLite to null, there is no need to change the destructor, as sqlite3_close handles null pointers for us.

This makes it possible to e.g. return Databases from functions. Gated behind a __cplusplus >= 201103L check for compatibility with older C++ versions.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.36% when pulling 65f719d on hubslave:patch-1 into b454170 on SRombauts:master.

@SRombauts SRombauts merged commit 9667c52 into SRombauts:master Feb 13, 2019
@SRombauts
Copy link
Owner

Thank you for your contribution!

Cheers!

@SRombauts SRombauts self-assigned this Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants