4 ms·
> I could never accept the coding standard for curly bracket positioning. OK, so I had to look. It's like they saw the two main camps (same line vs next line)
by brianpursley 6y ago
> I could never accept the coding standard for curly bracket positioning.
OK, so I had to look.
It's like they saw the two main camps (same line vs next line) and said "let's come up with something everyone will hate":
TInt GetROMSize(TInt /*aDeviceNumber*/, TInt /*aAttrib*/, TBool /*aSet*/, TAny* aInOut)
{
TMemoryInfoV1 info;
TPckg<TMemoryInfoV1> infoPckg(info);
TInt r=UserSvr::HalFunction(EHalGroupKernel, EKernelHalMemoryInfo, (TAny*)&infoPckg, NULL);
if (r==KErrNone)
{
*(TInt*)aInOut=info.iTotalRomInBytes;
}
return r;
}
- perennialmind 6y agoWow. I had a CS professor insist on exactly that style. I couldn't stand it at first, but making accommodations was the whole point. Unfortunately it got me thinking about what I would want. Now I'm the weirdo and I rarely get to write it the way I want. <shrug>
- mjevans 6y agoI can understand the desire to have the brackets at the same indent... but WOW does this break my brain having the inner code not indented from the bracket level. (I tend to prefer the opening backet being on the same line as the condition gate/guard and rely on the parser to inform me of missing brackets. This is even better in languages that have a single format convention.)