Index: ps/trunk/source/lib/allocators/unique_range.cpp =================================================================== --- ps/trunk/source/lib/allocators/unique_range.cpp +++ ps/trunk/source/lib/allocators/unique_range.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015 Wildfire Games +/* Copyright (c) 2017 Wildfire Games * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -88,7 +88,7 @@ if(idxDeleterAligned == 0) // (optional optimization) RegisterUniqueRangeDeleter(FreeAligned, &idxDeleterAligned); - return std::move(UniqueRange(p, size, idxDeleterAligned)); + return UniqueRange(p, size, idxDeleterAligned); } @@ -100,5 +100,5 @@ if(idxDeleter == 0) // (optional optimization) RegisterUniqueRangeDeleter(vm::Free, &idxDeleter); - return std::move(UniqueRange(p, size, idxDeleter)); + return UniqueRange(p, size, idxDeleter); } Index: ps/trunk/source/lib/file/archive/archive_zip.cpp =================================================================== --- ps/trunk/source/lib/file/archive/archive_zip.cpp +++ ps/trunk/source/lib/file/archive/archive_zip.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015 Wildfire Games +/* Copyright (c) 2017 Wildfire Games * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -448,7 +448,7 @@ size_t cd_numEntries = 0; size_t cd_size = 0; RETURN_STATUS_IF_ERR(LocateCentralDirectory(m_file, m_fileSize, cd_ofs, cd_numEntries, cd_size)); - UniqueRange buf(std::move(io::Allocate(cd_size))); + UniqueRange buf(io::Allocate(cd_size)); io::Operation op(*m_file.get(), buf.get(), cd_size, cd_ofs); RETURN_STATUS_IF_ERR(io::Run(op)); @@ -533,7 +533,7 @@ static Status LocateCentralDirectory(const PFile& file, off_t fileSize, off_t& cd_ofs, size_t& cd_numEntries, size_t& cd_size) { const size_t maxScanSize = 66000u; // see below - UniqueRange buf(std::move(io::Allocate(maxScanSize))); + UniqueRange buf(io::Allocate(maxScanSize)); // expected case: ECDR at EOF; no file comment Status ret = ScanForEcdr(file, fileSize, (u8*)buf.get(), sizeof(ECDR), cd_numEntries, cd_ofs, cd_size); @@ -662,7 +662,7 @@ // allocate memory const size_t csizeMax = codec->MaxOutputSize(size_t(usize)); - UniqueRange buf(std::move(io::Allocate(sizeof(LFH) + pathnameLength + csizeMax))); + UniqueRange buf(io::Allocate(sizeof(LFH) + pathnameLength + csizeMax)); // read and compress file contents size_t csize; u32 checksum; Index: ps/trunk/source/lib/file/io/io.h =================================================================== --- ps/trunk/source/lib/file/io/io.h +++ ps/trunk/source/lib/file/io/io.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011 Wildfire Games +/* Copyright (c) 2017 Wildfire Games * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the @@ -54,7 +54,7 @@ // never reused (avoids displacing other items). static inline UniqueRange Allocate(size_t size, size_t alignment = maxSectorSize) { - return std::move(AllocateAligned(size, alignment)); + return AllocateAligned(size, alignment); } @@ -190,7 +190,7 @@ const bool temporaryBuffersRequested = (op.buf == 0); if(temporaryBuffersRequested) - buffers = std::move(io::Allocate(blockSize * p.queueDepth, p.alignment)); + buffers = io::Allocate(blockSize * p.queueDepth, p.alignment); for(size_t i = 0; i < ARRAY_SIZE(controlBlocks); i++) { Index: ps/trunk/source/simulation2/system/ComponentManager.cpp =================================================================== --- ps/trunk/source/simulation2/system/ComponentManager.cpp +++ ps/trunk/source/simulation2/system/ComponentManager.cpp @@ -546,7 +546,7 @@ void CComponentManager::RegisterComponentType(InterfaceId iid, ComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char* name, const std::string& schema) { - ComponentType c(CT_Native, iid, alloc, dealloc, name, schema, std::move(DefPersistentRooted())); + ComponentType c(CT_Native, iid, alloc, dealloc, name, schema, DefPersistentRooted()); m_ComponentTypesById.insert(std::make_pair(cid, std::move(c))); m_ComponentTypeIdsByName[name] = cid; } @@ -554,7 +554,7 @@ void CComponentManager::RegisterComponentTypeScriptWrapper(InterfaceId iid, ComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char* name, const std::string& schema) { - ComponentType c(CT_ScriptWrapper, iid, alloc, dealloc, name, schema, std::move(DefPersistentRooted())); + ComponentType c(CT_ScriptWrapper, iid, alloc, dealloc, name, schema, DefPersistentRooted()); m_ComponentTypesById.insert(std::make_pair(cid, std::move(c))); m_ComponentTypeIdsByName[name] = cid; // TODO: merge with RegisterComponentType