used make_shared and make_unique for creating shared pointers

This commit is contained in:
asapelkin
2019-10-24 09:50:31 +03:00
committed by wmayer
parent 5a75d2ff45
commit 55e758c2f9
3 changed files with 10 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "AreaOrderer.h"
#include <memory>
#include "Area.h"
using namespace std;
@@ -132,7 +133,7 @@ void CInnerCurves::Unite(shared_ptr<CInnerCurves> c)
else
{
if(curve.IsClockwise())curve.Reverse();
Insert(shared_ptr<CCurve>(new CCurve(curve)));
Insert(std::make_shared<CCurve>(curve));
}
}
}