mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 14:00:09 -10:00
Review URL: http://codereview.appspot.com/4963062 git-svn-id: https://angleproject.googlecode.com/svn/trunk@752 736b8ea6-26fd-11df-bfd4-992fa37f6226
46 lines
846 B
C++
46 lines
846 B
C++
//
|
|
// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
//
|
|
|
|
#include "Macro.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include "stl_utils.h"
|
|
|
|
namespace pp
|
|
{
|
|
|
|
Macro::Macro(Type type,
|
|
std::string* name,
|
|
TokenVector* parameters,
|
|
TokenVector* replacements)
|
|
: mType(type),
|
|
mName(name),
|
|
mParameters(parameters),
|
|
mReplacements(replacements)
|
|
{
|
|
}
|
|
|
|
Macro::~Macro()
|
|
{
|
|
delete mName;
|
|
|
|
if (mParameters)
|
|
{
|
|
std::for_each(mParameters->begin(), mParameters->end(), Delete());
|
|
delete mParameters;
|
|
}
|
|
|
|
if (mReplacements)
|
|
{
|
|
std::for_each(mReplacements->begin(), mReplacements->end(), Delete());
|
|
delete mReplacements;
|
|
}
|
|
}
|
|
|
|
} // namespace pp
|
|
|