Skip to content

Commit

Permalink
Turn off Turn off whitespace insertion when using boost::wave.
Browse files Browse the repository at this point in the history
  • Loading branch information
marsupial committed Dec 19, 2017
1 parent eb7ad07 commit 8b5ae9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/liboslcomp/oslcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,10 @@ OSLCompilerImpl::preprocess_buffer (const std::string &buffer,
context_type ctx (instring.begin(), instring.end(), filename.c_str());

// Turn on support of variadic macros, e.g. #define FOO(...) __VA_ARGS__
// Turn off whitespace insertion.
boost::wave::language_support lang = boost::wave::language_support (
ctx.get_language() | boost::wave::support_option_variadics);
(ctx.get_language() | boost::wave::support_option_variadics)
& ~boost::wave::language_support::support_option_insert_whitespace);
ctx.set_language (lang);

ctx.add_macro_definition (OIIO::Strutil::format("OSL_VERSION_MAJOR=%d",
Expand Down

0 comments on commit 8b5ae9f

Please sign in to comment.