| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@yashLadha This PR moves the type conversions from the place where we extract the native value from the passed JS value to the place where we pass the native value to libuv, but the conversions are still there and they are still the same. I guess for TCPWrap::Connect it makes sense to use Int32 instead of Uint32, though. |
Sorry, something went wrong.
|
@addaleax My argument for this change is to have a consistent type for the assignment because we are casting the values as Uint32 and storing it an int or unsigned int, isn't the value in which we are storing should follow the same type for consistency.
For this what should be cases when it can be negative, as port is always a positive property |
Sorry, something went wrong.
|
@yashLadha I’m not arguing against this, to be clear :) I’m just pointing out that this performs the same type conversions and has the same behavior as it did before. |
Sorry, something went wrong.
|
@addaleax Got it, but when browsing through the code, the cast and the type of lvalue seemed inconsistent that's why i created this PR. 😄 I know it won't make any difference because both can store the value but enforcing it I thought would be a good idea. |
Sorry, something went wrong.
|
@addaleax Is something else to be done? |
Sorry, something went wrong.
|
@yashLadha I think somebody needs to approve this PR. If you want my personal opinion, I think I’d be -0.005 on this, given that it makes the cast a bit less visible (you’d have to look up the definitions of the libuv functions to know that it is happening, instead of just “seeing” it like you did), and I would be +0.005 on a PR that adds static_cast to be explicit about the conversions, but ultimately, I don’t have a strong opinion on anything here. |
Sorry, something went wrong.
|
@addaleax that is a very helpful review. Checking 👍 |
Sorry, something went wrong.
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting.
Sorry, something went wrong.
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
We are converting the argument to a uint32_t value but the lvalue is not consistent with the casting. PR-URL: #32879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
| Back | FazBrowse Home | New Git URL |
We are doing conversion of arguments to uint32_t but the lvalue type
is not consistent with the casting. Also, the lvalue type differs at
different occurrences. Ideally, such changes should be picked up by the linter, can we move forward in this direction 🤔 .
Checklist