atom-auto-indent
atom-auto-indent copied to clipboard
Not working properly for C++ or C language
Hello,
I found it is not working properly for C or C++ language.
For example,
if (fTestNet && fRegTest)
return false;
After auto indentation, it will become:
if (fTestNet && fRegTest)
return false;
Another example is:
void SelectParams(CChainParams::Network network) {
switch (network) {
case CChainParams::MAIN:
pCurrentParams = &mainParams;
break;
case CChainParams::TESTNET:
pCurrentParams = &testNetParams;
break;
case CChainParams::REGTEST:
pCurrentParams = ®TestParams;
break;
default:
assert(false && "Unimplemented network");
return;
}
}
After auto indentation it will become:
void SelectParams(CChainParams::Network network) {
switch (network) {
case CChainParams::MAIN:
pCurrentParams = &mainParams;
break;
case CChainParams::TESTNET:
pCurrentParams = &testNetParams;
break;
case CChainParams::REGTEST:
pCurrentParams = ®TestParams;
break;
default:
assert(false && "Unimplemented network");
return;
}
}
BR, Terry
Hey,
Sadly, that's how Atom indents. I have find how to deal with these issues.
Any solution would be great ;-;
Regards, LeNiglo.