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

Remove some duplicated member functions in Context #4740

Closed
JinheLin opened this issue Apr 24, 2022 · 5 comments · Fixed by #4786
Closed

Remove some duplicated member functions in Context #4740

JinheLin opened this issue Apr 24, 2022 · 5 comments · Fixed by #4786
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/code-quality-improvement PR that can improve the code quality type/enhancement The issue or PR belongs to an enhancement.

Comments

@JinheLin
Copy link
Contributor

Enhancement

Some member functions in Context are duplicated.

    DatabasePtr getDatabase(const String & database_name) const;
    DatabasePtr getDatabase(const String & database_name);
    DatabasePtr tryGetDatabase(const String & database_name) const;
    DatabasePtr tryGetDatabase(const String & database_name);

    Databases getDatabases() const;
    Databases getDatabases();
@JinheLin JinheLin added type/enhancement The issue or PR belongs to an enhancement. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. type/code-quality-improvement PR that can improve the code quality labels Apr 24, 2022
@junaire
Copy link
Contributor

junaire commented Apr 26, 2022

I would like to help~

@JinheLin
Copy link
Contributor Author

I would like to help~

Thank you very much. Please open a pull request when your code is ready.

@junaire
Copy link
Contributor

junaire commented Apr 27, 2022

I would like to help~

Thank you very much. Please open a pull request when your code is ready.

In fact, I have some trouble building the project, I've opend #4771

@junaire
Copy link
Contributor

junaire commented Apr 27, 2022

Hey @JinheLin, I think I may have trouble understanding the issue, could you please clarify in which way the methods are duplicated? Do you mean remove the non-const version, or remove Context::getDatabase and only use Context::tryGetDatabase ?

@JinheLin
Copy link
Contributor Author

JinheLin commented Apr 28, 2022

Removing the non-const version is enough and there should be no effect on other code. @junaire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/code-quality-improvement PR that can improve the code quality type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants