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

Fix marshal cqlint - optimization #320

Merged

Conversation

illia-li
Copy link

Changes:

Marshal functions:

  • unnecessary value type conversion has been removed.
  • unnecessary dereference has been removed.
  • removed unnecessary value checks for reflect.Int8, reflect.Int16, reflect.Int32, reflect.Uint8, reflect.Uint16, reflect.Uint32 kinds
  • makes the right value type in the error of the EncReflect function

Unmarshal functions:

  • unnecessary value type conversion has been removed.
  • redo the functions for the double references values.
  • the condition data == nil moved after the condition len(data)==0 in the functions of the double references values.

change `EncInt8`,`Encint16` function:
* unnecessary value conversion has been removed.

change in `EncBigIntR`:
* unnecessary dereference has been removed.

changes in `EncReflect` function:
* removed unnecessary checks for `reflect.Int8`,`reflect.Int16`,`reflect.Int32`,`reflect.Uint8`,`reflect.Uint16`,`reflect.Uint32` kinds
* makes the right value type in the errors of the `EncReflect` function
changes:
* double conversion of values has been removed.
* the condition `data == nil` moved after the condition `len(data)==0` in the functions of the double references values.
@dkropachev dkropachev merged commit fe4ceb8 into scylladb:master Nov 5, 2024
1 check passed
@illia-li illia-li deleted the il/fix/marshal/optimization_cqlint branch November 7, 2024 12:34
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.

2 participants