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

Replace std::stol with ParseInt #897

Merged
merged 13 commits into from
Sep 25, 2022
Merged

Conversation

tanruixiang
Copy link
Member

It closes #896

src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/util.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
@tanruixiang
Copy link
Member Author

@PragmaTwice Thanks for your warm help. I'm just going to upload a draft to save my progress and keep doing it tomorrow. I didn't even check it myself. You have helped me. Thank you very much😆

src/redis_cmd.cc Outdated Show resolved Hide resolved
@tanruixiang
Copy link
Member Author

tanruixiang commented Sep 19, 2022

@PragmaTwice Hi. The original code uses std:: stol , but using ParseInt<long int> instead the lint will report an error. Do you have any better suggestions?

src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/redis_cmd.cc Outdated Show resolved Hide resolved
src/util.cc Outdated Show resolved Hide resolved
@tanruixiang
Copy link
Member Author

tanruixiang commented Sep 20, 2022

That is to say, the type used in the original code shoule be the same here. In this pr, regardless of whether the type can be adjusted logically. If the type can be modified, we can do it in the next Pr?

@PragmaTwice HI. What do you think about this. If you want to modify it in this pr, I will modify it immediately, otherwise I will modify it to another pr.

@PragmaTwice
Copy link
Member

That is to say, the type used in the original code shoule be the same here. In this pr, regardless of whether the type can be adjusted logically. If the type can be modified, we can do it in the next Pr?

@PragmaTwice HI. What do you think about this. If you want to modify it in this pr, I will modify it immediately, otherwise I will modify it to another pr.

I think it is ok to change it, since it is trivial.

@tanruixiang
Copy link
Member Author

That is to say, the type used in the original code shoule be the same here. In this pr, regardless of whether the type can be adjusted logically. If the type can be modified, we can do it in the next Pr?

@PragmaTwice HI. What do you think about this. If you want to modify it in this pr, I will modify it immediately, otherwise I will modify it to another pr.

I think it is ok to change it, since it is trivial.

Ok, I will change it .

@tanruixiang tanruixiang marked this pull request as ready for review September 21, 2022 13:47
Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution!

@tanruixiang tanruixiang requested review from tisonkun and removed request for git-hulk and ShooterIT September 23, 2022 12:22
@PragmaTwice
Copy link
Member

Hi @tanruixiang, I notice there is also some code using std::stoul or std::stoull in kvrocks, do you want to also replace them in this PR? Or it is OK to merge it and replace them in another PR.

@tanruixiang
Copy link
Member Author

Hi @tanruixiang, I notice there is also some code using std::stoul or std::stoull in kvrocks, do you want to also replace them in this PR? Or it is OK to merge it and replace them in another PR.

OK I am willing to do this task. I think this PR information is a bit too much, we can continue to do this in the next PR.

@PragmaTwice
Copy link
Member

PragmaTwice commented Sep 24, 2022

Hi @tanruixiang, I notice there is also some code using std::stoul or std::stoull in kvrocks, do you want to also replace them in this PR? Or it is OK to merge it and replace them in another PR.

OK I am willing to do this task. I think this PR information is a bit too much, we can continue to do this in the next PR.

Thanks. Maybe there are also some atoi and std::stoi, you can replace them too in another PR.

@PragmaTwice
Copy link
Member

Thanks. I will merge it soon.

@PragmaTwice PragmaTwice merged commit 6d8e8f5 into apache:unstable Sep 25, 2022
@tanruixiang tanruixiang deleted the replace_stol branch October 28, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace std::stol with ParseInt.
3 participants