Skip to content

Commit

Permalink
Reduce scope of a ton of variables, misc cleanups
Browse files Browse the repository at this point in the history
Codacy-inspired cleanups. Makes code look more C++-looking in many
places.
  • Loading branch information
GPSBabelDeveloper committed Jul 4, 2018
1 parent 076ca84 commit 866a496
Show file tree
Hide file tree
Showing 89 changed files with 25,921 additions and 2,685 deletions.
Binary file added GPSBabel.build/Release/GPSBabel.build/dgph
Binary file not shown.
Binary file added GPSBabel.build/Release/GPSBabel.build/dgph~
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
make -C /Users/robertlipe/src/gpsbabel -f GPSBabel.xcodeproj/qt_makeqmake.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
make -C /Users/robertlipe/src/gpsbabel -f GPSBabel.xcodeproj/qt_preprocess.mak
Binary file added GPSBabel.build/Release/Qt Preprocess.build/dgph
Binary file not shown.
Binary file added GPSBabel.build/Release/Qt Preprocess.build/dgph~
Binary file not shown.
333 changes: 333 additions & 0 deletions GPSBabel.pro.user

Large diffs are not rendered by default.

1,885 changes: 0 additions & 1,885 deletions GPSBabel.xcodeproj/project.pbxproj

This file was deleted.

235 changes: 0 additions & 235 deletions GPSBabel.xcodeproj/qt_makeqmake.mak

This file was deleted.

52 changes: 0 additions & 52 deletions GPSBabel.xcodeproj/qt_preprocess.mak

This file was deleted.

15 changes: 6 additions & 9 deletions an1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ typedef struct guid {
static char*
ReadString(gbfile* f, short len)
{
char* result = nullptr;
result = (char*)xcalloc(1, len + 1);
char* result = (char*)xcalloc(1, len + 1);
if (len) {
gbfread(result, 1, len, f);
}
Expand Down Expand Up @@ -652,13 +651,12 @@ static void Write_AN1_Header(gbfile* f)
static void Read_AN1_Bitmaps(gbfile* f)
{
long count;
unsigned short magic;
an1_symbol_record symbol;

count = ReadLong(f);

while (count) {
magic = ReadShort(f);
unsigned short magic = ReadShort(f);
switch (magic) {
case 0x4d42:
Skip_AN1_BM(f);
Expand Down Expand Up @@ -736,20 +734,19 @@ static void
Write_One_AN1_Waypoint(const Waypoint* wpt)
{
an1_waypoint_record* rec;
int local;
format_specific_data* fs = nullptr;
bool local;
format_specific_data* fs = fs_chain_find(wpt->fs, FS_AN1W);

fs = fs_chain_find(wpt->fs, FS_AN1W);
if (fs) {
rec = (an1_waypoint_record*)fs;
xfree(rec->name);
local = 0;
local = false;
if (opt_zoom) {
rec->visible_zoom = opt_zoom_num;
}
} else {
rec = Alloc_AN1_Waypoint();
local = 1;
local = true;
rec->magic = 1;
rec->type = wpt_type_num;
rec->unk2 = 3;
Expand Down
Loading

0 comments on commit 866a496

Please sign in to comment.