fix whitespaces and indents

trailing spaces are removed
tabs are replaced with 4 spaces

# Conflicts:
#	src/celengine/cmdparser.cpp
#	src/celengine/command.cpp
#	src/celestia/celestiacore.cpp
#	src/celestia/celestiacore.h
#	src/celestia/qt/qtappwin.cpp
#	src/celestia/qt/qtglwidget.cpp
#	src/celestia/win32/winmain.cpp
pull/110/head
Hleb Valoshka 2018-03-11 16:12:58 +03:00
parent c1fdbcfc8d
commit 882e4ecf28
287 changed files with 9780 additions and 9798 deletions

View File

@ -10633,6 +10633,7 @@ void Renderer::addWatcher(RendererWatcher* watcher)
watchers.insert(watchers.end(), watcher);
}
void Renderer::removeWatcher(RendererWatcher* watcher)
{
list<RendererWatcher*>::iterator iter =
@ -10641,6 +10642,7 @@ void Renderer::removeWatcher(RendererWatcher* watcher)
watchers.erase(iter);
}
void Renderer::notifyWatchers() const
{
for (list<RendererWatcher*>::const_iterator iter = watchers.begin();

View File

@ -126,4 +126,3 @@ private:
#endif // _CELENGINE_RENDERGLSL_H_

View File

@ -2069,8 +2069,6 @@ void CelestiaCore::charEntered(const char *c_p, int modifiers)
sim->chase();
break;
case '[':
if ((renderer->getRenderFlags() & Renderer::ShowAutoMag) == 0)
{
@ -2195,6 +2193,7 @@ void CelestiaCore::charEntered(const char *c_p, int modifiers)
// with a Lua script.
editMode = !editMode;
break;
#ifdef USE_HDR
case '|':
renderer->setBloomEnabled(!renderer->getBloomEnabled());
@ -2203,6 +2202,7 @@ void CelestiaCore::charEntered(const char *c_p, int modifiers)
else
flash(_("Bloom disabled"));
break;
case '<':
{
char buf[64];
@ -2211,6 +2211,7 @@ void CelestiaCore::charEntered(const char *c_p, int modifiers)
flash(buf);
}
break;
case '>':
{
char buf[64];
@ -2315,12 +2316,14 @@ void CelestiaCore::tick()
if (zoomMotion != 0.0f)
{
double span = 0.1;
#if 0
double fraction;
if (currentTime - zoomTime >= span)
fraction = (zoomTime + span) - (currentTime - dt);
else
fraction = dt / span;
#endif
// sim->changeOrbitDistance(zoomMotion * (float) fraction);
if (currentTime - zoomTime >= span)

View File

@ -482,7 +482,6 @@ void* Celx_CheckUserData(lua_State* l, int index, int id)
return NULL;
}
// Return the CelestiaCore object stored in the globals table
static CelestiaCore* getAppCore(lua_State* l, FatalErrors fatalErrors = NoErrors)
{

View File

@ -142,8 +142,3 @@ void EclipseFinderDlg::gotoEclipse(QListViewItem* item, const QPoint& p, int col
(YRotation(-PI / 2) * XRotation(-PI / 2)), 2.5);
}
}

View File

@ -1348,7 +1348,6 @@ void CelestiaAppWindow::createMenus()
#else
m_appCore->setTimeZoneBias(-timezone + 3600 * daylight);
#endif
m_appCore->setTimeZoneName(tzname[daylight?0:1]);
// If LocalTime is set to false, set the time zone bias to zero.
if (settings.contains("LocalTime"))

View File

@ -287,7 +287,6 @@ void CelestiaGlWidget::mousePressEvent( QMouseEvent* m )
appCore->mouseButtonDown(m->x(), m->y(), CelestiaCore::MiddleButton);
else if (m->button() == RightButton)
appCore->mouseButtonDown(m->x(), m->y(), CelestiaCore::RightButton);
}

View File

@ -168,8 +168,7 @@ unsigned short PackSpectralType(char *spectralType)
else
number = 0;
if (luminosity != LUM_VI)
{
if (luminosity != LUM_VI) {
i++;
luminosity = LUM_V;
while (i < 13 && spectralType[i] != '\0') {
@ -238,7 +237,6 @@ HDNameEnt *ReadCommonNames(FILE *fp)
name2[0] = '\0';
name2++;
{
int hd;
if (sscanf(buf, "%d", &hd) != 1)
break;
@ -251,7 +249,6 @@ HDNameEnt *ReadCommonNames(FILE *fp)
strcpy(hdNames[i].commonName, name2);
}
}
}
nHDNames = i;
qsort(hdNames, nHDNames, sizeof(HDNameEnt), CompareHDNameEnt);
@ -334,12 +331,9 @@ Star *ReadHipparcosCatalog(FILE *fp)
stars[i].dec = -stars[i].dec;
sscanf(buf + 435, "%12s", &stars[i].spectral);
sscanf(buf + 119, "%f", &parallaxError);
if (stars[i].parallax <= 0 || parallaxError / stars[i].parallax > 1)
{
if (stars[i].parallax <= 0 || parallaxError / stars[i].parallax > 1) {
stars[i].parallaxError = (unsigned char) 255;
}
else
{
} else {
stars[i].parallaxError =
(unsigned char) (parallaxError / stars[i].parallax * 200);
}
@ -427,9 +421,6 @@ int main(int argc, char *argv[])
}
#endif
{
int i;
FILE *fp = fopen("out", "wb");
if (fp == NULL) {
fprintf(stderr, "Error opening output file.\n");
@ -437,9 +428,8 @@ int main(int argc, char *argv[])
}
BINWRITE(fp, nStars);
for (i = 0; i < nStars; i++)
for (int i = 0; i < nStars; i++)
WriteStar(fp, &Stars[i]);
fclose(fp);
}
printf("Stars in catalog = %d\n", nStars);

View File

@ -119,7 +119,5 @@ int main(int argc, char *argv[])
StarName sn(common, bayerLetter, constel);
cout << sn.getDesignation() << ' ' << constel->getAbbreviation() << '\n';
}
}
}

View File

@ -236,11 +236,9 @@ StellarClass ParseStellarClass(char *starType)
else
i--;
break;
case 'D':
type = StellarClass::WhiteDwarf;
return StellarClass(type, specClass, 0, lum);
default:
specClass = StellarClass::Spectral_Unknown;
break;

View File

@ -199,8 +199,6 @@ void printStellarClass(uint16 sc, ostream& out)
bool DumpxRefDatabase(istream& in, ostream& out)
{
// Verify that the star database file has a correct header
char header[8];
in.read(header, sizeof header);
@ -222,7 +220,6 @@ bool DumpxRefDatabase(istream& in, ostream& out)
uint32 record = 0;
for (;;)
{
if (!in.good())
{
cerr << "Error reading from star database at record " << record << endl;
@ -259,18 +256,20 @@ C ABBREVIATION OF THE CONSTELLATION IN WHICH IT IS LOCATED
C
-------------------------------------------------------*/
{
f2 = fopen("data.dat", "r"); if (!f2) perror("data.dat") ;
E = Ein; //(ICRS, Epoch=JJJJ.nn)
RAH = RA2c; DECD = DE2c;
RAH = RA2c;
DECD = DE2c;
/* PRECESS POSITION TO 1875.0 EQUINOX */
ARAD = CONVH * RAH;
DRAD = CONVD * DECD;
HGTPRC(&ARAD,&DRAD,&E,&E75,&A,&D);
if(A < 0.)A=A+PI4 ;
if(A >= PI4)A=A-PI4 ;
if (A < 0.)
A = A + PI4;
if (A >= PI4)
A = A - PI4;
RA = A/CONVH;
DEC = D/CONVD;
@ -300,7 +299,8 @@ C
return *CON;
}
else
if(RAU < RA) continue ;
if(RAU < RA)
continue;
else
{
fclose(f2);