From a12e588079700d55a0b788fea2df7727c2e41f52 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 27 Mar 2022 17:42:26 +0200 Subject: Removed MemDebug from FoundationEx --- Stars45/Token.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'Stars45/Token.cpp') diff --git a/Stars45/Token.cpp b/Stars45/Token.cpp index b9453a9..2cc97b5 100644 --- a/Stars45/Token.cpp +++ b/Stars45/Token.cpp @@ -11,7 +11,6 @@ Scanner class implementation */ -#include "MemDebug.h" #include "Token.h" #include "Reader.h" #include "Text.h" @@ -44,7 +43,7 @@ Token::Token(const Token& rhs) strcpy_s(mSymbol, rhs.mSymbol); } else { - mFullSymbol = new(__FILE__, __LINE__) char[mLength + 1]; + mFullSymbol = new char[mLength + 1]; strcpy(mFullSymbol, rhs.mFullSymbol); } } @@ -64,7 +63,7 @@ Token::Token(const char* s, int t, int k, int l, int c) strcpy_s(mSymbol, s); } else { - mFullSymbol = new(__FILE__, __LINE__) char[mLength + 1]; + mFullSymbol = new char[mLength + 1]; strcpy(mFullSymbol, s); } } @@ -77,7 +76,7 @@ Token::Token(const Text& s, int t, int k, int l, int c) strcpy_s(mSymbol, s.data()); } else { - mFullSymbol = new(__FILE__, __LINE__) char[mLength + 1]; + mFullSymbol = new char[mLength + 1]; strcpy(mFullSymbol, s.data()); } } @@ -109,7 +108,7 @@ Token::operator = (const Token& rhs) strcpy_s(mSymbol, rhs.mSymbol); } else { - mFullSymbol = new(__FILE__, __LINE__) char[mLength + 1]; + mFullSymbol = new char[mLength + 1]; strcpy(mFullSymbol, rhs.mFullSymbol); } @@ -296,7 +295,7 @@ Scanner::Scanner(const Scanner& rhs) reader(rhs.reader), line(rhs.line), old_line(0), lineStart(rhs.lineStart) { - str = new(__FILE__, __LINE__) char [strlen(rhs.str) + 1]; + str = new char [strlen(rhs.str) + 1]; strcpy(str, rhs.str); } @@ -304,7 +303,7 @@ Scanner::Scanner(const Text& s) : reader(0), index(0), old_index(0), length(s.length()), line(0), old_line(0), lineStart(0) { - str = new(__FILE__, __LINE__) char [s.length() + 1]; + str = new char [s.length() + 1]; strcpy(str, s.data()); } @@ -319,7 +318,7 @@ Scanner& Scanner::operator = (const Scanner& rhs) { delete [] str; - str = new(__FILE__, __LINE__) char [strlen(rhs.str) + 1]; + str = new char [strlen(rhs.str) + 1]; strcpy(str, rhs.str); index = rhs.index; @@ -338,7 +337,7 @@ void Scanner::Load(const Text& s) { delete [] str; - str = new(__FILE__, __LINE__) char [s.length() + 1]; + str = new char [s.length() + 1]; strcpy(str, s.data()); index = 0; @@ -465,7 +464,7 @@ Scanner::Get(Need need) int col = start - lineStart; if (line == 0) col++; - char* buf = new(__FILE__, __LINE__) char [extent + 1]; + char* buf = new char [extent + 1]; strncpy(buf, str + start, extent); buf[extent] = '\0'; -- cgit v1.1