[Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of...
authorHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2018 06:51:06 +0000 (06:51 +0000)
committerHironori.Fujii@sony.com <Hironori.Fujii@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2018 06:51:06 +0000 (06:51 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192617

Reviewed by Alex Christensen.

* COMEnumVariant.h:
(COMEnumVariant<ContainerType>::adopt): Removed 'typename' from non dependent names.
(COMEnumVariant<ContainerType>::createInstance): Ditto.
(COMEnumVariant<ContainerType>::Next): Prepend 'typename' for dependent names.
* COMPropertyBag.h:
(HashType>::createInstance): Removed 'typename' from non dependent names.
(HashType>::adopt): Ditto.
(HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
(HashType>::GetPropertyInfo): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239152 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKitLegacy/win/COMEnumVariant.h
Source/WebKitLegacy/win/COMPropertyBag.h
Source/WebKitLegacy/win/ChangeLog

index 6d978e4..9c922a6 100644 (file)
@@ -69,7 +69,7 @@ private:
 
 // COMEnumVariant ------------------------------------------------------------------
 template<typename ContainerType>
-COMEnumVariant<typename ContainerType>* COMEnumVariant<ContainerType>::adopt(ContainerType& container) 
+COMEnumVariant<ContainerType>* COMEnumVariant<ContainerType>::adopt(ContainerType& container) 
 {
     COMEnumVariant* instance = new COMEnumVariant;
     instance->m_container.swap(container);
@@ -79,7 +79,7 @@ COMEnumVariant<typename ContainerType>* COMEnumVariant<ContainerType>::adopt(Con
 }
 
 template<typename ContainerType>
-COMEnumVariant<typename ContainerType>* COMEnumVariant<ContainerType>::createInstance(const ContainerType& container)
+COMEnumVariant<ContainerType>* COMEnumVariant<ContainerType>::createInstance(const ContainerType& container)
 {
     COMEnumVariant* instance = new COMEnumVariant(container);
     instance->AddRef();
@@ -135,7 +135,7 @@ HRESULT STDMETHODCALLTYPE COMEnumVariant<ContainerType>::Next(ULONG celt, VARIAN
         if (m_currentPos == m_container.end())
             return S_FALSE;
 
-        COMVariantSetter<ContainerType::ValueType>::setVariant(&rgVar[i], *m_currentPos);
+        COMVariantSetter<typename ContainerType::ValueType>::setVariant(&rgVar[i], *m_currentPos);
         ++m_currentPos;
         if (pCeltFetched)
             (*pCeltFetched)++;
index b0d21f4..2165a23 100644 (file)
@@ -77,7 +77,7 @@ private:
 
 // COMPropertyBag ------------------------------------------------------------------
 template<typename ValueType, typename KeyType, typename HashType>
-COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::createInstance(const HashMapType& hashMap)
+COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<ValueType, KeyType, HashType>::createInstance(const HashMapType& hashMap)
 {
     COMPropertyBag* instance = new COMPropertyBag(hashMap);
     instance->AddRef();
@@ -85,7 +85,7 @@ COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType,
 }
 
 template<typename ValueType, typename KeyType, typename HashType>
-COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<typename ValueType, typename KeyType, HashType>::adopt(HashMapType& hashMap)
+COMPropertyBag<ValueType, KeyType, HashType>* COMPropertyBag<ValueType, KeyType, HashType>::adopt(HashMapType& hashMap)
 {
     COMPropertyBag* instance = new COMPropertyBag;
     instance->m_hashMap.swap(hashMap);
@@ -137,8 +137,8 @@ HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, KeyType, HashType>::Read(LPC
     if (!pszPropName)
         return E_POINTER;
 
-    HashMapType::const_iterator it = m_hashMap.find(String(pszPropName));
-    HashMapType::const_iterator end = m_hashMap.end();
+    auto it = m_hashMap.find(String(pszPropName));
+    auto end = m_hashMap.end();
     if (it == end)
         return E_INVALIDARG;
 
@@ -205,9 +205,8 @@ HRESULT STDMETHODCALLTYPE COMPropertyBag<ValueType, KeyType, HashType>::GetPrope
         return E_INVALIDARG;
 
     *pcProperties = 0;
-    typedef HashMapType::const_iterator Iterator;
-    Iterator current = m_hashMap.begin();
-    Iterator end = m_hashMap.end();
+    auto current = m_hashMap.begin();
+    auto end = m_hashMap.end();
     for (ULONG i = 0; i < iProperty; ++i, ++current)
         ;
     for (ULONG j = 0; j < cProperties && current != end; ++j, ++current) {
index b1e3b9b..40ac053 100644 (file)
@@ -1,5 +1,22 @@
 2018-12-12  Fujii Hironori  <Hironori.Fujii@sony.com>
 
+        [Win][Clang][WebKitLegacy] warning: expected a qualified name after 'typename' of COMEnumVariant and COMPropertyBag
+        https://bugs.webkit.org/show_bug.cgi?id=192617
+
+        Reviewed by Alex Christensen.
+
+        * COMEnumVariant.h:
+        (COMEnumVariant<ContainerType>::adopt): Removed 'typename' from non dependent names.
+        (COMEnumVariant<ContainerType>::createInstance): Ditto.
+        (COMEnumVariant<ContainerType>::Next): Prepend 'typename' for dependent names.
+        * COMPropertyBag.h:
+        (HashType>::createInstance): Removed 'typename' from non dependent names.
+        (HashType>::adopt): Ditto.
+        (HashType>::Read): Replaced dependent name 'HashMapType::const_iterator' with 'auto'.
+        (HashType>::GetPropertyInfo): Ditto.
+
+2018-12-12  Fujii Hironori  <Hironori.Fujii@sony.com>
+
         [Win][Clang][WebKitLegacy] WebFrame.cpp: warning: delete called on non-final 'WebFrame' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
         https://bugs.webkit.org/show_bug.cgi?id=192618