Permalink
Browse files

* Make a difficult mutex check a bit easier to read and hopefully a b…

…it safer, too

* Reorder some code
* Replace some duplicate code with goto
* Simplify some if's

Maybe this also has some influence on our current top crash ("Attempted to connect a connection that is not disconnected")
  • Loading branch information...
dmoagx committed Nov 14, 2015
1 parent 0f40c5e commit 0b9fb7e62aeba608081eb3ca1bc52dc7020c8add
Showing with 186 additions and 190 deletions.
  1. +9 −0 Source/SPConstants.h
  2. +0 −1 Source/SPDatabaseStructure.h
  3. +177 −189 Source/SPDatabaseStructure.m
View
@@ -682,3 +682,12 @@ typedef NSUInteger NSCellHitResult;
// See http://stackoverflow.com/questions/4415524
#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
// This definition is mostly for legibility
#ifndef ESUCCESS
#define ESUCCESS 0
#else
#if ESUCCESS != 0
#error 'ESUCCESS' must be defined as zero!
#endif
#endif
@@ -51,7 +51,6 @@
// Setup and teardown
- (id)initWithDelegate:(SPDatabaseDocument *)theDelegate;
- (void)setConnectionToClone:(SPMySQLConnection *)aConnection;
- (void)destroy:(NSNotification *)notification;
// Information
- (SPMySQLConnection *)connection;
Oops, something went wrong.

0 comments on commit 0b9fb7e

Please sign in to comment.