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 hb_atomic_* variants based on C++11 atomics #1605

Merged
merged 1 commit into from Mar 5, 2019

Conversation

stbergmann
Copy link
Contributor

@stbergmann stbergmann commented Mar 5, 2019

I stumbled over this when trying to upgrade the version of HarfBuzz used by
LibreOffice to 3.2.1 (see https://gerrit.libreoffice.org/plugins/gitiles/core/+/b7ddc514bff9bdf682abae537f990aa01dc2c0fb "Upgrade to latest
HarfBuzz 2.3.1"), where building with MSVC 2017 failed like

c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2440: 'reinterpret_cast': cannot convert from 'const int *' to 'std::atomic *'
c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): note: Conversion loses qualifiers
c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2227: left of '->load' must point to class/struct/union/generic type

(see https://ci.libreoffice.org/job/gerrit_windows/29916/).

I added all the necessary "const" to make building of HarfBuzz 2.3.1 with
MSVC 2017 succeed for me. There may be more missing at least conceptually.

I stumbled over this when trying to upgrade the version of HarfBuzz used by
LibreOffice to 3.2.1 (see <https://gerrit.libreoffice.org/plugins/gitiles/core/
+/b7ddc514bff9bdf682abae537f990aa01dc2c0fb%5E!/> "Upgrade to latest
HarfBuzz 2.3.1"), where building with MSVC 2017 failed like

> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2440: 'reinterpret_cast': cannot convert from 'const int *' to 'std::atomic<int> *'
> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): note: Conversion loses qualifiers
> c:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\unpackedtarball\harfbuzz\src\hb-atomic.hh(272): error C2227: left of '->load' must point to class/struct/union/generic type

(see <https://ci.libreoffice.org/job/gerrit_windows/29916/>).

I added all the necessary "const" to make building of HarfBuzz 2.3.1 with
MSVC 2017 succeed for me.  There may be more missing at least conceptually.
@behdad behdad merged commit d936ad4 into harfbuzz:master Mar 5, 2019
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.

None yet

2 participants