summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-01-26 21:09:48 (GMT)
committerBrad King <brad.king@kitware.com>2005-01-26 21:09:48 (GMT)
commitf1b52f3f985d2c9522c00d666279ae8067c31305 (patch)
tree2671b1bc52dc251721ee538bb5ca9a556ad23611
parentda7b9d306e1f4c77b82fe8bd8a9cefe5bf5b4628 (diff)
downloadCMake-f1b52f3f985d2c9522c00d666279ae8067c31305.zip
CMake-f1b52f3f985d2c9522c00d666279ae8067c31305.tar.gz
CMake-f1b52f3f985d2c9522c00d666279ae8067c31305.tar.bz2
COMP: Added constructor to cmDependsFortranFile to avoid using initializer list. Also included assert.h.
-rw-r--r--Source/cmDependsFortran.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index b173645..e9edc40 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -21,6 +21,7 @@
#include "cmDependsFortranLexer.h" /* Interface to lexer object. */
#include "cmDependsFortranParser.h" /* Interface to parser object. */
+#include <assert.h>
#include <stack>
//----------------------------------------------------------------------------
@@ -37,6 +38,9 @@ extern "C"
// Define parser object internal structure.
struct cmDependsFortranFile
{
+ cmDependsFortranFile(FILE* file, YY_BUFFER_STATE buffer,
+ const std::string& dir):
+ File(file), Buffer(buffer), Directory(dir) {}
FILE* File;
YY_BUFFER_STATE Buffer;
std::string Directory;
@@ -215,7 +219,7 @@ int cmDependsFortranParser_FilePush(cmDependsFortranParser* parser,
YY_BUFFER_STATE current =
cmDependsFortranLexer_GetCurrentBuffer(parser->Scanner);
std::string dir = cmSystemTools::GetParentDirectory(fname);
- cmDependsFortranFile f = {file, current, dir};
+ cmDependsFortranFile f(file, current, dir);
YY_BUFFER_STATE buffer =
cmDependsFortran_yy_create_buffer(0, 16384, parser->Scanner);
cmDependsFortran_yy_switch_to_buffer(buffer, parser->Scanner);