This commit is contained in:
halx99 2020-08-25 14:08:17 +08:00
parent d150e7cbc4
commit 5c850e00ac
1 changed files with 3 additions and 3 deletions

View File

@ -23,8 +23,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#ifndef __SUPPORT_CC_UTILS_H__ #ifndef __CC_UTILS_H__
#define __SUPPORT_CC_UTILS_H__ #define __CC_UTILS_H__
#include <vector> #include <vector>
#include <string> #include <string>
@ -180,7 +180,7 @@ namespace utils
inline T* createInstance(F&& finit, Ts&&... args) inline T* createInstance(F&& finit, Ts&&... args)
{ {
T* pRet = new(std::nothrow) T(); T* pRet = new(std::nothrow) T();
if (pRet && std::mem_fn(finit)(pRet, std::forward<_Types>(args)...)) { if (pRet && std::mem_fn(finit)(pRet, std::forward<Ts>(args)...)) {
pRet->autorelease(); pRet->autorelease();
return pRet; return pRet;
} }