Code formatting

Open-source port of PoP that runs natively on Windows, Linux, etc.

Moderator: English Moderator Team

Post Reply
The Prince of Persia
The Prince of Persia
Posts: 1548
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Code formatting

Post by David » June 26th, 2017, 6:46 pm

From viewtopic.php?p=21471#p21471 :
David wrote: I looked through the SDLPoP sources.
Indentation is mostly done using tabs, but there are a few places that use spaces.
I guess I should fix that.
This is what I have now: (separate branch)

What bothers me is that then Blame will show my name at places where I only fixed the indentation.
Oh well.

Wise Scribe
Wise Scribe
Posts: 367
Joined: June 25th, 2009, 10:01 pm

Re: Code formatting

Post by Falcury » June 27th, 2017, 5:50 pm

I think the editor I use (CLion) only has settings for either tabs or spaces as leading whitespace. As far as I can tell indentation and alignment are not really distinguished?
See: ... ation.html

(So my expectation is that a mixed scheme will not be obeyed by the automatic code formatting features of the editor...)

Oh no, my bad, I think I found the setting (Smart Tabs): ... e-c-c.html

And I also read Norbert's document about the pros and cons of tabs versus spaces just now, which the topic of the thread you linked to in the opening post. Interesting stuff. I don't think I realized before that there are sensible in-between options for the tabs-versus-spaces problem :P

Post Reply