Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated register keyword to enable C++17 compatibility with Apple Clang #1296

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
40 changes: 20 additions & 20 deletions src/osgPlugins/cfg/ConfigLexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,9 +832,9 @@ YY_MALLOC_DECL

YY_DECL
{
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
int yy_act;

#line 35 ".././ConfigLexer.l"

Expand Down Expand Up @@ -881,7 +881,7 @@ YY_DECL
yy_match:
do
{
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
Expand Down Expand Up @@ -1598,9 +1598,9 @@ void yyFlexLexer::LexerOutput( const char* buf, int size )

int yyFlexLexer::yy_get_next_buffer()
{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
register int number_to_move, i;
char *dest = yy_current_buffer->yy_ch_buf;
char *source = yytext_ptr;
int number_to_move, i;
int ret_val;

if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
Expand Down Expand Up @@ -1730,14 +1730,14 @@ int yyFlexLexer::yy_get_next_buffer()

yy_state_type yyFlexLexer::yy_get_previous_state()
{
register yy_state_type yy_current_state;
register char *yy_cp;
yy_state_type yy_current_state;
char *yy_cp;

yy_current_state = yy_start;

for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
{
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
Expand All @@ -1764,10 +1764,10 @@ yy_state_type yyFlexLexer::yy_get_previous_state()

yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
{
register int yy_is_jam;
register char *yy_cp = yy_c_buf_p;
int yy_is_jam;
char *yy_cp = yy_c_buf_p;

register YY_CHAR yy_c = 1;
YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yy_last_accepting_state = yy_current_state;
Expand All @@ -1786,20 +1786,20 @@ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
}


void yyFlexLexer::yyunput( int c, register char* yy_bp )
void yyFlexLexer::yyunput( int c, char* yy_bp )
{
register char *yy_cp = yy_c_buf_p;
char *yy_cp = yy_c_buf_p;

/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;

if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
int number_to_move = yy_n_chars + 2;
char *dest = &yy_current_buffer->yy_ch_buf[
yy_current_buffer->yy_buf_size + 2];
register char *source =
char *source =
&yy_current_buffer->yy_ch_buf[number_to_move];

while ( source > yy_current_buffer->yy_ch_buf )
Expand Down Expand Up @@ -2119,7 +2119,7 @@ yyconst char *s2;
int n;
#endif
{
register int i;
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
Expand All @@ -2133,7 +2133,7 @@ static int yy_flex_strlen( s )
yyconst char *s;
#endif
{
register int n;
int n;
for ( n = 0; s[n]; ++n )
;

Expand Down