Skip to content

ORC-1461: Mark Int128::getHighBits() and Int128::getLowBits() as const - #1560

Closed
progval wants to merge 1 commit into
apache:mainfrom
progval:int128-const-accessors
Closed

progval wants to merge 1 commit into
apache:mainfrom
progval:int128-const-accessors

Conversation

@progval

@progval progval commented Jul 4, 2023

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as const to indicate this into callers.

Why are the changes needed?

Same motivation as #1558: I am writing a Rust binding, and the methods not being const give me extra constraints.

How was this patch tested?

make test passes.

@github-actions github-actions Bot added the CPP label Jul 4, 2023
@wgtmac

wgtmac commented Jul 6, 2023

Copy link
Copy Markdown
Member

Thanks for submitting a PR! Could you please create a JIRA issue (https://issues.apache.org/jira/projects/ORC/issues/) for this?

If you need to create an account, please refer to https://selfserve.apache.org/jira-account.html

@progval progval changed the title Mark Int128::getHighBits() and Int128::getLowBits() as const ORC-1461: Mark Int128::getHighBits() and Int128::getLowBits() as const Jul 6, 2023
@progval

progval commented Jul 6, 2023

Copy link
Copy Markdown
Contributor Author

Done

@wgtmac

wgtmac commented Jul 6, 2023

Copy link
Copy Markdown
Member

Thank you! @progval

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1, LGTM.

@wgtmac wgtmac closed this in c05df75 Jul 7, 2023
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
…`const`

### What changes were proposed in this pull request?

These two accessors do not mutate the state, so they can be tagged as `const` to indicate this into callers.

### Why are the changes needed?

Same motivation as apache#1558: I am writing a Rust binding, and the methods not being `const` give me extra constraints.

### How was this patch tested?

`make test` passes.

Closes apache#1560 from progval/int128-const-accessors.

Authored-by: Valentin Lorentz <vlorentz@softwareheritage.org>
Signed-off-by: Gang Wu <ustcwg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants