Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flexc++/generator/conflicts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ bool Generator::conflicts() const
if (Stat(classHeaderPath))
{
ret = errExisting(classHeaderPath, "class-name",
"^class " + d_options.className() + "\\b")
"^\\s*class\\s+" + d_options.className() + "\\b")
or ret;

if (not d_options.nameSpace().empty())
ret = errExisting(classHeaderPath, "namespace",
"^namespace " + d_options.nameSpace() + "\\b")
"^\\s*namespace\\s+" + d_options.nameSpace() + "\\b")
or ret;

ret = errExisting(classHeaderPath, Options::baseclassHeaderSpec(),
"^#include \"" + d_options.baseclassHeaderName() + '"')
"^\\s*#include\\s+\"" + d_options.baseclassHeaderName() + '"')
or ret;
}

string const &implementationHeader = d_options.implementationHeaderPath();

if (Stat(implementationHeader))
ret = errExisting(implementationHeader, d_options.classHeaderSpec(),
"^#include \"" + d_options.classHeaderName() + '"')
"^\\s*#include\\s+\"" + d_options.classHeaderName() + '"')
or ret;

return ret;
Expand Down
2 changes: 1 addition & 1 deletion flexc++/generator/debugfunctions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void Generator::debugFunctions(std::ostream &out) const
{
out <<
"void " << d_baseclassScope << "setDebug(bool onOff)\n"
"{}\n"
"{ (void)(onOff); }\n"
"\n"
"bool " << d_baseclassScope << "debug() const\n"
"{\n"
Expand Down
5 changes: 4 additions & 1 deletion flexc++/generator/inputimplementation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ void Generator::inputImplementation(ostream &out) const
:
d_in(iStream),
d_lineNr(lineNr)
{}
{
if(not *iStream)
throw std::runtime_error("Cannot read from stream");
}

size_t )" << d_baseclassScope << R"(Input::get()
{
Expand Down