extract method refactor on some C++ source fails with an error

I selected a couple lines of code to test out extract method and received the error,
"Selected block should represent a set of statements or an expression"

The two lines of code are in fact assignment statements,

    mVSyncUpdates = true;
    mFrameTime = (1/30.0f) * 1000.0f;

They happen to be in a member function of a class.

Can anyone provide any guidance?

Cheers,
Scott

3 comments
Comment actions Permalink

Scott,

first make sure you select the whole two lines, with semicolons, and try again.
If it doesn't help, create an issue here and attach a sample project here: youtrack.jetbrains.net/issues/OC#newissue=yes

0
Comment actions Permalink

Anton,
Thanks for the prompt reply.

I had selected the entire of each line (including the semicolons).

I tried again today and it worked fine so who knows?

Cheers,
Scott

0
Comment actions Permalink

OK, next time it happens, try to isolate it and attach to an issue.

0

Please sign in to leave a comment.