Unknown C++ braces syntaxis -


this question has answer here:

look @ snippet:

void sample_compositor::createeffects(void) {     ogre::compositorptr comp3 = ogre::compositormanager::getsingleton().create("motion blur", ogre::resourcegroupmanager::default_resource_group_name);     {         {             ogre::compositiontargetpass *tp = t->getoutputtargetpass();             tp->setinputmode(ogre::compositiontargetpass::im_none);             {                 ogre::compositionpass *pass = tp->createpass();                 pass->settype(ogre::compositionpass::pt_renderquad);                 pass->setmaterialname("ogre/compositor/motionblur");                 pass->setinput(0, "sum");             }         }     } } 

if code legit, how these blocks work?

they blocks introduce scope, , hide contents. valid.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -