Tracktion / choc

A collection of header only classes, permissively licensed, to provide basic useful tasks with the bare-minimum of dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix: ‘auto’ deduced as ‘id’ Xcode warning

geraintluff opened this issue · comments

I'm using Xcode 13.2.1, and I get a warning when auto is deduced as id. This is on by default in Clang.

This can be fixed by replacing auto with id in choc_WebView.h. This matches choc_MessageLoop.h, which is the only other place call<id> is used to initialise a variable.

Screenshot 2024-01-28 at 13 32 17

I originally opened this as PR #40, but since PRs are complicated by copyright issues, you can find the locations yourself with the RegEx auto .* = call<id>:

find . -iname \*.h -exec grep -Hn -i "auto .* = call<id>" {} \;

Thanks for the heads-up, I'll update my tests to the latest clang and make sure that warning is turned on!