From 18e21f8b090a49934a80d56b1796e0c1d469a22c Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 3 Feb 2017 20:34:51 -0800 Subject: remove C++14 feature from tools --- tools/preproc/Makefile | 2 +- tools/preproc/c_file.cpp | 2 +- tools/scaninc/Makefile | 2 +- tools/scaninc/c_file.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile index 24f60e3f6..2d577c79f 100644 --- a/tools/preproc/Makefile +++ b/tools/preproc/Makefile @@ -1,6 +1,6 @@ CXX := g++ -CXXFLAGS := -std=c++14 -O2 -Wall -Wno-switch +CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \ utf8.cpp diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp index 3b4024efe..a2f178623 100644 --- a/tools/preproc/c_file.cpp +++ b/tools/preproc/c_file.cpp @@ -256,7 +256,7 @@ std::unique_ptr CFile::ReadWholeFile(const std::string& path, i size = ftell(fp); - std::unique_ptr buffer = std::make_unique(size); + std::unique_ptr buffer = std::unique_ptr(new unsigned char[size]); rewind(fp); diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile index c408e4a6e..71c4389ef 100644 --- a/tools/scaninc/Makefile +++ b/tools/scaninc/Makefile @@ -1,6 +1,6 @@ CXX = g++ -CXXFLAGS = -Wall -std=c++14 -O2 +CXXFLAGS = -Wall -std=c++11 -O2 SRCS = scaninc.cpp c_file.cpp asm_file.cpp diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp index 970fbe135..bb84fedbe 100644 --- a/tools/scaninc/c_file.cpp +++ b/tools/scaninc/c_file.cpp @@ -222,7 +222,7 @@ std::unique_ptr CFile::ReadWholeFile(const std::string& path, i size = ftell(fp); - std::unique_ptr buffer = std::make_unique(size); + std::unique_ptr buffer = std::unique_ptr(new unsigned char[size]); rewind(fp); -- cgit v1.2.3