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

In Tester, fix C++ compiler warning with Apple clang 15.0 #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brawer
Copy link

@brawer brawer commented Nov 17, 2023

This fixes 39 C++ compiler warnings when building SheenFigure with Apple clang 15.0.0. For example, after this change, the following warning does not get emitted anymore:

Compiling C++ object sheenfigure_tester.p/Tools_Tester_OpenType_Builder.cpp.o
../Tools/Tester/OpenType/Builder.cpp:47:43: warning: unqualified call to 'std::forward' [-Wunqualified-std-cast-call]
    shared_ptr<T> object = make_shared<T>(forward<Args>(args)...);
                                          ^
                                          std::
../Tools/Tester/OpenType/Builder.cpp:56:36: note: in instantiation of function template specialization 'SheenFigure::Tester::OpenType::Builder::createObject<std::vector<unsigned short>, unsigned long &>' requested here
    return (size == 0 ? nullptr : &createObject<vector<T>>(size)[0]);
                                   ^                              ^

This fixes 39 C++ compiler warnings when building SheenFigure
with Apple clang 15.0.0. For example, after this change, the
following warning does not get emitted anymore:

```
Compiling C++ object sheenfigure_tester.p/Tools_Tester_OpenType_Builder.cpp.o
../Tools/Tester/OpenType/Builder.cpp:47:43: warning: unqualified call to 'std::forward' [-Wunqualified-std-cast-call]
    shared_ptr<T> object = make_shared<T>(forward<Args>(args)...);
                                          ^
                                          std::
../Tools/Tester/OpenType/Builder.cpp:56:36: note: in instantiation of function template specialization 'SheenFigure::Tester::OpenType::Builder::createObject<std::vector<unsigned short>, unsigned long &>' requested here
    return (size == 0 ? nullptr : &createObject<vector<T>>(size)[0]);
                                   ^                              ^
```
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.

1 participant