diff --git a/example_brep/example_brep.xcodeproj/project.pbxproj b/example_brep/example_brep.xcodeproj/project.pbxproj
index e410739c..b178f77c 100644
--- a/example_brep/example_brep.xcodeproj/project.pbxproj
+++ b/example_brep/example_brep.xcodeproj/project.pbxproj
@@ -100,7 +100,7 @@
1D41D1751EE08F2B00EB94A6 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0830;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1D41D17C1EE08F2B00EB94A6 = {
@@ -111,9 +111,10 @@
};
buildConfigurationList = 1D41D1781EE08F2B00EB94A6 /* Build configuration list for PBXProject "example_brep" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1D41D1741EE08F2B00EB94A6;
@@ -148,15 +149,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -196,15 +205,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/example_convert/example_convert.xcodeproj/project.pbxproj b/example_convert/example_convert.xcodeproj/project.pbxproj
index 9b6400ca..65da7c6d 100644
--- a/example_convert/example_convert.xcodeproj/project.pbxproj
+++ b/example_convert/example_convert.xcodeproj/project.pbxproj
@@ -115,7 +115,7 @@
};
buildConfigurationList = 1D41D18B1EE08F4D00EB94A6 /* Build configuration list for PBXProject "example_convert" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
diff --git a/example_read/example_read.xcodeproj/project.pbxproj b/example_read/example_read.xcodeproj/project.pbxproj
index 0064b901..bf826297 100644
--- a/example_read/example_read.xcodeproj/project.pbxproj
+++ b/example_read/example_read.xcodeproj/project.pbxproj
@@ -106,7 +106,7 @@
1D40664C1EE0826A008E12FE /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0830;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1D4066531EE0826A008E12FE = {
@@ -117,9 +117,10 @@
};
buildConfigurationList = 1D40664F1EE0826A008E12FE /* Build configuration list for PBXProject "example_read" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1D40664B1EE0826A008E12FE;
@@ -155,15 +156,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -204,15 +213,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/example_roundtrip/example_roundtrip.xcodeproj/project.pbxproj b/example_roundtrip/example_roundtrip.xcodeproj/project.pbxproj
index 04382c05..1e1196a2 100644
--- a/example_roundtrip/example_roundtrip.xcodeproj/project.pbxproj
+++ b/example_roundtrip/example_roundtrip.xcodeproj/project.pbxproj
@@ -115,7 +115,7 @@
};
buildConfigurationList = 1D41D18B1EE08F4D00EB94A6 /* Build configuration list for PBXProject "example_roundtrip" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
diff --git a/example_test/example_test.xcodeproj/project.pbxproj b/example_test/example_test.xcodeproj/project.pbxproj
index b17b5584..bdb317b8 100644
--- a/example_test/example_test.xcodeproj/project.pbxproj
+++ b/example_test/example_test.xcodeproj/project.pbxproj
@@ -100,7 +100,7 @@
1D4E128F2016B7C800B90EA3 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0920;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1D4E12962016B7C800B90EA3 = {
@@ -152,6 +152,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -159,6 +160,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -207,6 +209,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@@ -214,6 +217,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
diff --git a/example_userdata/example_userdata.xcodeproj/project.pbxproj b/example_userdata/example_userdata.xcodeproj/project.pbxproj
index b5fd39e8..818688e7 100644
--- a/example_userdata/example_userdata.xcodeproj/project.pbxproj
+++ b/example_userdata/example_userdata.xcodeproj/project.pbxproj
@@ -105,7 +105,7 @@
1D41D19B1EE08F7100EB94A6 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0830;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1D41D1A21EE08F7100EB94A6 = {
@@ -116,9 +116,10 @@
};
buildConfigurationList = 1D41D19E1EE08F7100EB94A6 /* Build configuration list for PBXProject "example_userdata" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1D41D19A1EE08F7100EB94A6;
@@ -154,15 +155,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -202,15 +211,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/example_write/example_write.xcodeproj/project.pbxproj b/example_write/example_write.xcodeproj/project.pbxproj
index 134a4492..1b09b333 100644
--- a/example_write/example_write.xcodeproj/project.pbxproj
+++ b/example_write/example_write.xcodeproj/project.pbxproj
@@ -107,7 +107,7 @@
1D41D1621EE08EF700EB94A6 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0830;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1D41D1691EE08EF700EB94A6 = {
@@ -118,9 +118,10 @@
};
buildConfigurationList = 1D41D1651EE08EF700EB94A6 /* Build configuration list for PBXProject "example_write" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1D41D1611EE08EF700EB94A6;
@@ -156,15 +157,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -204,15 +213,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/freetype263/freetype.xcodeproj/project.pbxproj b/freetype263/freetype.xcodeproj/project.pbxproj
index 57551a44..858361a3 100644
--- a/freetype263/freetype.xcodeproj/project.pbxproj
+++ b/freetype263/freetype.xcodeproj/project.pbxproj
@@ -654,7 +654,7 @@
};
buildConfigurationList = DF86E6191D26CEDA00A4A7E7 /* Build configuration list for PBXProject "freetype" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
diff --git a/freetype263/opennurbs_public_freetype.xcodeproj/project.pbxproj b/freetype263/opennurbs_public_freetype.xcodeproj/project.pbxproj
index 19a72775..7d7c312e 100644
--- a/freetype263/opennurbs_public_freetype.xcodeproj/project.pbxproj
+++ b/freetype263/opennurbs_public_freetype.xcodeproj/project.pbxproj
@@ -238,7 +238,7 @@
1DB028251ED6433600FA9144 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0900;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1DB0282C1ED6433600FA9144 = {
@@ -249,9 +249,10 @@
};
buildConfigurationList = 1DB028281ED6433600FA9144 /* Build configuration list for PBXProject "opennurbs_public_freetype" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1DB028241ED6433600FA9144;
@@ -327,15 +328,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -375,15 +384,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/freetype263/src/truetype/ttinterp.c b/freetype263/src/truetype/ttinterp.c
index ccbb1d76..e14a45f0 100644
--- a/freetype263/src/truetype/ttinterp.c
+++ b/freetype263/src/truetype/ttinterp.c
@@ -5779,8 +5779,8 @@
#endif /* TT_CONFIG_OPTION_SUBPIXEL_HINTING */
exc->zp0.org[point].x = TT_MulFix14( distance,
exc->GS.freeVector.x );
- exc->zp0.org[point].y = TT_MulFix14( distance,
- exc->GS.freeVector.y ),
+ exc->zp0.org[point].y = TT_MulFix14(distance,
+ exc->GS.freeVector.y);
exc->zp0.cur[point] = exc->zp0.org[point];
}
#ifdef TT_CONFIG_OPTION_SUBPIXEL_HINTING
diff --git a/makefile b/makefile
index c7496d1d..753fc03b 100644
--- a/makefile
+++ b/makefile
@@ -48,14 +48,20 @@ ON_GNU_COMMON_FLAGS = $(ON_GNU_OPTIMIZER_FLAGS) $(ON_GNU_WARNING_FLAGS) -D_GNU_S
# C compiler and flags
CC = gcc
+# uncomment below for Clang
+#CC = clang
CFLAGS = $(ON_GNU_COMMON_FLAGS)
# C++ compiler and flags
CCC = g++
+# uncomment below for Clang
+#CCC = clang++
CCFLAGS = $(ON_GNU_COMMON_FLAGS) -std=c++14
LINK = $(CCC)
LINKFLAGS =
+# below necessary LINKFLAGS on Linux for the UUID library
+#LINKFLAGS = -luuid
###############################################################
@@ -378,6 +384,7 @@ ON_SRC = opennurbs_3dm_attributes.cpp \
opennurbs_topology.cpp \
opennurbs_torus.cpp \
opennurbs_unicode.cpp \
+ opennurbs_unicode_cpsb.cpp \
opennurbs_units.cpp \
opennurbs_userdata.cpp \
opennurbs_userdata_obsolete.cpp \
@@ -444,6 +451,7 @@ ON_OBJ = opennurbs_3dm_attributes.o \
opennurbs_fsp.o \
opennurbs_function_list.o \
opennurbs_geometry.o \
+ opennurbs_glyph_outline.o \
opennurbs_group.o \
opennurbs_hash_table.o \
opennurbs_hatch.o \
@@ -509,6 +517,7 @@ ON_OBJ = opennurbs_3dm_attributes.o \
opennurbs_revsurface.o \
opennurbs_rtree.o \
opennurbs_sha1.o \
+ opennurbs_sleeplock.o \
opennurbs_sort.o \
opennurbs_sphere.o \
opennurbs_statics.o \
@@ -550,6 +559,7 @@ ON_OBJ = opennurbs_3dm_attributes.o \
opennurbs_topology.o \
opennurbs_torus.o \
opennurbs_unicode.o \
+ opennurbs_unicode_cpsb.o \
opennurbs_units.o \
opennurbs_userdata.o \
opennurbs_userdata_obsolete.o \
diff --git a/opennurbs_3dm_properties.cpp b/opennurbs_3dm_properties.cpp
index ede19015..899d6e58 100644
--- a/opennurbs_3dm_properties.cpp
+++ b/opennurbs_3dm_properties.cpp
@@ -92,7 +92,7 @@ bool ON_3dmRevisionHistory::CreateTimeIsSet() const
memset(&jan_1_1970,0,sizeof(jan_1_1970));
jan_1_1970.tm_mday = 1; /* day of the month - [1,31] */
jan_1_1970.tm_year = 70; /* years since 1900 */
- return ( ON_CompareRevisionHistoryTime(&jan_1_1970,&m_create_time) >= 0 );
+ return ( ON_CompareRevisionHistoryTime(&jan_1_1970,&m_create_time) <= 0 );
}
/*
Returns:
diff --git a/opennurbs_3dm_settings.cpp b/opennurbs_3dm_settings.cpp
index 263053db..d8cdce74 100644
--- a/opennurbs_3dm_settings.cpp
+++ b/opennurbs_3dm_settings.cpp
@@ -5370,7 +5370,7 @@ void ON_3dmSettings::Dump( ON_TextLog& dump ) const
// ON_3dmAnimationProperties
//
-const ON_3dmAnimationProperties ON_3dmAnimationProperties::Default;
+const ON_3dmAnimationProperties ON_3dmAnimationProperties::Default ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_3dmAnimationProperties);
bool ON_3dmAnimationProperties::Read(ON_BinaryArchive& archive)
{
diff --git a/opennurbs_apple_nsfont.cpp b/opennurbs_apple_nsfont.cpp
index e4cf9c58..2e763f1f 100644
--- a/opennurbs_apple_nsfont.cpp
+++ b/opennurbs_apple_nsfont.cpp
@@ -875,8 +875,11 @@ bool ON_AppleFontGetGlyphOutline(
}
CGPathRef applePath = CTFontCreatePathForGlyph(appleFont, appleGlyphIndex, nullptr);
- if (nullptr == applePath)
- return false;
+
+ // NOTE WELL: applePath = nullptr for space, tab and so on.
+ // We still need to get the advance for these code points.
+ // NO // if (nullptr == applePath)
+ // NO // return false;
unsigned int font_design_units_per_M = CTFontGetUnitsPerEm(appleFont);
const CGFloat point_size = CTFontGetSize(appleFont);
@@ -888,8 +891,11 @@ bool ON_AppleFontGetGlyphOutline(
ON_AppleGlyphOutlineAccumlator acc;
acc.BeginGlyphOutline(font_design_units_per_M, figure_type, &outline);
- CGPathApply(applePath, &acc, ON_AppleGlyphOutlineAccumlator::Internal_PathApplierFunction);
- CGPathRelease(applePath);
+ if ( nullptr != applePath)
+ {
+ CGPathApply(applePath, &acc, ON_AppleGlyphOutlineAccumlator::Internal_PathApplierFunction);
+ CGPathRelease(applePath);
+ }
acc.EndOutline();
// Add Glyph metrics to outline
diff --git a/opennurbs_archive.cpp b/opennurbs_archive.cpp
index 2698bd2c..efe62154 100644
--- a/opennurbs_archive.cpp
+++ b/opennurbs_archive.cpp
@@ -42,6 +42,7 @@ const ON_String Internal_RuntimeEnvironmentToString(
ON_ENUM_TO_STRING_CASE(ON::RuntimeEnvironment::Windows);
ON_ENUM_TO_STRING_CASE(ON::RuntimeEnvironment::Apple);
ON_ENUM_TO_STRING_CASE(ON::RuntimeEnvironment::Android);
+ ON_ENUM_TO_STRING_CASE(ON::RuntimeEnvironment::Linux);
}
ON_ERROR("Invalid runtime_environment parameter value.");
diff --git a/opennurbs_archive_manifest.cpp b/opennurbs_archive_manifest.cpp
index 6cf5f27a..fdf2e3e4 100644
--- a/opennurbs_archive_manifest.cpp
+++ b/opennurbs_archive_manifest.cpp
@@ -882,7 +882,7 @@ ON_NameHash ON_NameHash::Create(
if ( bEmpty )
return ON_NameHash::EmptyNameHash;
- hash.m_parent_id = name_parent_id,
+ hash.m_parent_id = name_parent_id;
hash.m_flags = (UTF32_length & ON_NameHash::flags_length_mask);
if (false == bIgnoreCase)
hash.m_flags |= ON_NameHash::flags_case_sensitive;
diff --git a/opennurbs_defines.cpp b/opennurbs_defines.cpp
index 07c501fc..dfc1af6b 100644
--- a/opennurbs_defines.cpp
+++ b/opennurbs_defines.cpp
@@ -503,7 +503,7 @@ int ON::CloseAllFiles()
//fcloseall is not supported on OS X
return EOF;
#elif defined(ON_COMPILER_GNU)
-#error TODO - call gcc fcloseall()
+ fcloseall();
#else
// I can't find an fcloseall() or _fcloseall() in
// gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
@@ -555,6 +555,7 @@ ON::RuntimeEnvironment ON::RuntimeEnvironmentFromUnsigned(
ON_ENUM_FROM_UNSIGNED_CASE(ON::RuntimeEnvironment::Windows);
ON_ENUM_FROM_UNSIGNED_CASE(ON::RuntimeEnvironment::Apple);
ON_ENUM_FROM_UNSIGNED_CASE(ON::RuntimeEnvironment::Android);
+ ON_ENUM_FROM_UNSIGNED_CASE(ON::RuntimeEnvironment::Linux);
}
ON_ERROR("Invalid runtime_environment_as_unsigned parameter value.");
return (ON::RuntimeEnvironment::Unset);
@@ -568,6 +569,8 @@ ON::RuntimeEnvironment ON::CurrentRuntimeEnvironment()
return ON::RuntimeEnvironment::Apple;
#elif defined (ON_RUNTIME_ANDROID)
return ON::RuntimeEnvironment::Android;
+#elif defined (ON_RUNTIME_LINUX)
+ return ON::RuntimeEnvironment::Linux;
#else
ON_ERROR("ON_RUNTIME_... not defined.");
return ON::RuntimeEnvironment::Unset;
diff --git a/opennurbs_defines.h b/opennurbs_defines.h
index a8fb05e6..284ae850 100644
--- a/opennurbs_defines.h
+++ b/opennurbs_defines.h
@@ -963,7 +963,12 @@ public:
///
/// ON::RuntimeEnvironment::Android indicates some version of Google Android.
///
- Android = 4
+ Android = 4,
+
+ ///
+ /// ON::RuntimeEnvironment::Linux indicates some version of Linux.
+ ///
+ Linux = 5
};
#pragma endregion
diff --git a/opennurbs_dimensionstyle.cpp b/opennurbs_dimensionstyle.cpp
index 226cdf3c..5c8aba37 100644
--- a/opennurbs_dimensionstyle.cpp
+++ b/opennurbs_dimensionstyle.cpp
@@ -2898,57 +2898,6 @@ bool ON_DimStyle::Read(
rc = true;
break;
}
- /*
- u = static_cast(m_dim_text_location);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dimradial_text_location);
- if (!file.WriteInt(u)) break;
-
-
- u = static_cast(m_text_vertical_alignment);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_leader_vertical_alignment);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_text_horizontal_alignment);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_leader_horizontal_alignment);
- if (!file.WriteInt(u)) break;
-
-
- u = static_cast(m_dim_text_vertical_alignment);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dimradial_text_vertical_alignment);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_text_orientation);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_leader_text_orientation);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dim_text_orientation);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dimradial_text_orientation);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dim_text_angle_style);
- if (!file.WriteInt(u)) break;
-
- u = static_cast(m_dimradial_text_angle_style);
- if (!file.WriteInt(u)) break;
-
- if (!file.WriteBool(m_text_underlined)) break;
-
- // END chunk version 1.4 information
-
-
- */
// Feb 2017 added enum values
u = static_cast(m_dim_text_location);
@@ -2966,7 +2915,7 @@ bool ON_DimStyle::Read(
u = static_cast(m_text_horizontal_alignment);
if (!file.ReadInt(&u)) break;
- m_text_horizontal_alignment = ON::TextHorizontalAlignment(u);
+ m_text_horizontal_alignment = ON::TextHorizontalAlignmentFromUnsigned(u);
u = static_cast(m_leader_text_vertical_alignment);
if (!file.ReadInt(&u)) break;
@@ -2974,7 +2923,7 @@ bool ON_DimStyle::Read(
u = static_cast(m_leader_text_horizontal_alignment);
if (!file.ReadInt(&u)) break;
- m_leader_text_horizontal_alignment = ON::TextHorizontalAlignment(u);
+ m_leader_text_horizontal_alignment = ON::TextHorizontalAlignmentFromUnsigned(u);
u = static_cast(m_text_orientation);
if (!file.ReadInt(&u)) break;
diff --git a/opennurbs_error.cpp b/opennurbs_error.cpp
index bd95eeeb..9c546bdd 100644
--- a/opennurbs_error.cpp
+++ b/opennurbs_error.cpp
@@ -624,7 +624,7 @@ void ON_ErrorEvent::Dump(
bool ON_ErrorLog::EnableLogging()
{
- if (nullptr == this)
+ if ( 0 == ((ON__UINT_PTR)this) )
return false;
if (this == ON_ACTIVE_ERROR_LOG)
return true;
diff --git a/opennurbs_file_utilities.cpp b/opennurbs_file_utilities.cpp
index 4776529d..b790efdc 100644
--- a/opennurbs_file_utilities.cpp
+++ b/opennurbs_file_utilities.cpp
@@ -2739,7 +2739,7 @@ ON__UINT64 ON_SecondsSinceJanOne1970UTC()
__time64_t t = _time64(nullptr);
return (ON__UINT64)t;
-#elif defined(ON_COMPILER_CLANG)
+#elif defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
//__time64_t t = _time64(nullptr);
time_t t = time(nullptr);
@@ -2779,7 +2779,7 @@ const ON_wString SecondsSinceJanOne1970UTCToString(
sec = uct.tm_sec;
}
-#elif defined(ON_COMPILER_CLANG)
+#elif defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
const time_t t = (time_t)seconds_since_epoch;
const struct tm* ptr = gmtime( &t );
diff --git a/opennurbs_font.cpp b/opennurbs_font.cpp
index 277554ca..6598be9c 100644
--- a/opennurbs_font.cpp
+++ b/opennurbs_font.cpp
@@ -6779,7 +6779,7 @@ const ON_wString ON_Font::FamilyNameFromDirtyName(
const wchar_t* prev_clean_family_name = nullptr;
for (size_t i = 0; i < installed_count; i++)
{
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
const ON_Font* font = installed_fonts[(int)i];
#else
const ON_Font* font = installed_fonts[i];
@@ -6842,7 +6842,7 @@ const ON_wString ON_Font::FamilyNameFromDirtyName(
InternalHashToName candidate;
for (size_t i = 0; i < count0; i++)
{
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
InternalHashToName e = a[(int)i];
#else
InternalHashToName e = a[i];
diff --git a/opennurbs_freetype_include.h b/opennurbs_freetype_include.h
index 28653ce7..78bb8f95 100644
--- a/opennurbs_freetype_include.h
+++ b/opennurbs_freetype_include.h
@@ -242,6 +242,12 @@
#endif
#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
+// Angle brackets must be used in the ft2build.h include because
+// that's what the freetype defined includes like FT_FREETYPE_H
+// use and they must work. If you get a compiler (CLang) error telling you
+// to use "quotes" instead,
+// ignore it and include the freetype directory in the header search
+// path for opennurbs_freetype.cpp.
#include
#include FT_FREETYPE_H
#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
diff --git a/opennurbs_fsp.cpp b/opennurbs_fsp.cpp
index a871df55..3c31831b 100644
--- a/opennurbs_fsp.cpp
+++ b/opennurbs_fsp.cpp
@@ -848,19 +848,19 @@ bool ON_FixedSizePool::ElementIdIsIncreasing(
{
// caller is confused.
ON_ERROR("m_sizeof_element must be a multiple of sizeof(unsigned int).");
- return nullptr;
+ return false;
}
if (id_offset < sizeof(void*) )
{
// caller is confused.
ON_ERROR("id_offset is too small.");
- return nullptr;
+ return false;
}
if (id_offset + sizeof(prev_id) > m_sizeof_element)
{
// caller is confused.
ON_ERROR("id_offset is too large.");
- return nullptr;
+ return false;
}
const size_t delta_i = m_sizeof_element / sizeof(id);
diff --git a/opennurbs_hatch.cpp b/opennurbs_hatch.cpp
index b3d03a1d..145107a0 100644
--- a/opennurbs_hatch.cpp
+++ b/opennurbs_hatch.cpp
@@ -466,6 +466,7 @@ double ON_HatchLine::AngleDegrees() const
double angle_degrees = m_angle_radians*(180.0/ON_PI);
if (angle_degrees >= 360.0)
angle_degrees = 0.0;
+ return angle_degrees;
}
return m_angle_radians; // UNSET VALUE OR NaN
}
diff --git a/opennurbs_ipoint.cpp b/opennurbs_ipoint.cpp
index 13c152a5..4f80c055 100644
--- a/opennurbs_ipoint.cpp
+++ b/opennurbs_ipoint.cpp
@@ -357,17 +357,19 @@ const ON_2iPoint ON_4iRect::BottomRight(void) const { return ON_2iPoint(right, b
bool ON_4iRect::IntersectRect(const ON_4iRect * r1, const ON_4iRect * r2)
{
- left = ON_Max(r1->left, r2->left);
- top = ON_Max(r1->top, r2->top);
- right = ON_Min(r1->right, r2->right);
- bottom = ON_Min(r1->bottom, r2->bottom);
+ left = ON_Max(r1->left, r2->left);
+ right = ON_Min(r1->right, r2->right);
+ if (right > left)
+ {
+ top = ON_Max(r1->top, r2->top);
+ bottom = ON_Min(r1->bottom, r2->bottom);
+ if (bottom > top)
+ return true;
+ }
- if (IsRectEmpty()) {
- // degenerate rectangle
- SetRectEmpty();
- return false;
- }
- return true;
+ // degenerate rectangle at this point...
+ SetRectEmpty();
+ return false;
}
bool ON_4iRect::IntersectRect(const ON_4iRect & r1, const ON_4iRect & r2) { return IntersectRect(&r1, &r2); }
diff --git a/opennurbs_locale.cpp b/opennurbs_locale.cpp
index ec6b4596..45c46a5b 100644
--- a/opennurbs_locale.cpp
+++ b/opennurbs_locale.cpp
@@ -35,7 +35,7 @@ static ON_CRT_locale_t ON_CRT_C_locale()
ON_C_locale = _create_locale(LC_ALL, "C");
#elif defined(ON_RUNTIME_APPLE)
ON_C_locale = _c_locale;
-#elif defined(ON_RUNTIME_ANDROID)
+#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
ON_C_locale = 0;
#else
ON_C_locale = _create_locale(category, locale);
@@ -104,7 +104,7 @@ static ON_CRT_locale_t ON_CRT_create_locale_ALL( const char * locale )
}
}
return newlocale(LC_ALL_MASK, apple_name, ON_CRT_C_locale() );
-#elif defined(ON_RUNTIME_ANDROID)
+#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
return 0;
#else
return _create_locale(category, locale);
@@ -1324,7 +1324,7 @@ public:
static bool Validate_sprintf_s()
{
-#if defined(ON_COMPILER_CLANG)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
// Test formatted printing
char buffer[64] = { 0 };
size_t buffer_capacity = (sizeof(buffer) / sizeof(buffer[0])) - 1;
@@ -1343,8 +1343,8 @@ public:
static bool Validate_sprintf_l()
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
// Test formatted printing
char buffer[64] = { 0 };
// Testing C-runtime - do not using ON_String::FormatIntoBuffer
@@ -1368,8 +1368,8 @@ public:
static bool Validate_sprintf_s_l()
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
// Test formatted printing
char buffer[64] = { 0 };
size_t buffer_capacity = (sizeof(buffer) / sizeof(buffer[0])) - 1;
@@ -1405,7 +1405,7 @@ public:
static bool Validate_sscanf_s()
{
-#if defined(ON_COMPILER_CLANG)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
// Test formatted scanning
double a = ON_UNSET_VALUE;
// Testing C-runtime - do not using ON_String::Scan
@@ -1422,8 +1422,8 @@ public:
static bool Validate_sscanf_l()
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
// Test formatted scanning
double a = ON_UNSET_VALUE;
// Testing C-runtime - do not using ON_String::Scan
@@ -1447,8 +1447,8 @@ public:
static bool Validate_sscanf_s_l()
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
// Test formatted scanning
double a = ON_UNSET_VALUE;
// Testing C-runtime - do not using ON_String::Scan
@@ -1602,7 +1602,7 @@ bool ON_Locale::SetPeriodAsCRuntimeDecimalPoint()
if (prev_type != _DISABLE_PER_THREAD_LOCALE && prev_type >= 0)
_configthreadlocale(prev_type);
-#elif defined(ON_COMPILER_CLANG)
+#elif defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
// Apple's Clang compiler
const char* s = setlocale(LC_NUMERIC, "C");
rc = (0 != s && 'C' == s[0] && 0 == s[1]);
diff --git a/opennurbs_nurbscurve.cpp b/opennurbs_nurbscurve.cpp
index 629ed85f..0f96f59d 100644
--- a/opennurbs_nurbscurve.cpp
+++ b/opennurbs_nurbscurve.cpp
@@ -3139,7 +3139,7 @@ double ON_NurbsCurve::GetCubicBezierApproximation(
{
const double failed_rc = ON_DBL_QNAN;
- if (nullptr == this)
+ if (ThisIsNullptr(false))
return failed_rc;
if (m_order < 2)
return failed_rc;
@@ -3306,10 +3306,7 @@ double ON_NurbsSurface::GetCubicBezierApproximation(
{
const double failed_rc = ON_DBL_QNAN;
- if (nullptr == this)
- return failed_rc;
-
- if (nullptr == this)
+ if ( ThisIsNullptr(false) )
return failed_rc;
if (this->m_order[0] < 2 || this->m_order[1] < 2)
return failed_rc;
diff --git a/opennurbs_object.cpp b/opennurbs_object.cpp
index b3a50c39..8d4056d8 100644
--- a/opennurbs_object.cpp
+++ b/opennurbs_object.cpp
@@ -1775,6 +1775,28 @@ bool ON_Object::IsValid(ON_TextLog* text_log) const
return true;
}
+bool ON_Object::ThisIsNullptr(
+ bool bSilentError
+) const
+{
+ // CLang warns that these tests may be ommitted because in "well-defined C++ code"
+ // they are always false.
+ //
+ // Earth to CLang:
+ // This tool to find code that is not well formed, alert us to that fact,
+ // but not potentiall not crash so our loyal customers don't loose their work.
+ //
+ // return (this == nullptr);
+ // return ( nullptr == this );
+ if (0 != ((ON__UINT_PTR)this))
+ return false;
+
+ if (false == bSilentError)
+ ON_ERROR("this is nullptr.");
+
+ return true;
+}
+
bool ON_Object::IsCorrupt(
bool bRepair,
bool bSilentError,
@@ -1782,12 +1804,7 @@ bool ON_Object::IsCorrupt(
) const
{
bool rc = true;
- if (this == nullptr)
- {
- if (false == bSilentError)
- ON_ERROR("this is nullptr.");
- }
- else
+ if (false == ThisIsNullptr(bSilentError) )
{
switch (ObjectType())
{
diff --git a/opennurbs_object.h b/opennurbs_object.h
index 5ad9e45b..da27728f 100644
--- a/opennurbs_object.h
+++ b/opennurbs_object.h
@@ -539,7 +539,18 @@ public:
*/
virtual bool IsValid( class ON_TextLog* text_log = nullptr ) const;
- /*
+ /*
+ Description:
+ Tests to see if this is null in ways that will prevent compilers like
+ CLang from thinking the test is not necessary.
+ The reason the runtime test is being performed is to find bugs that call
+ member functions on null pointers.
+ */
+ bool ThisIsNullptr(
+ bool bSilentError
+ ) const;
+
+ /*
Description:
Check for corrupt data values that are likely to cause crashes.
Parameters:
diff --git a/opennurbs_public.xcodeproj/project.pbxproj b/opennurbs_public.xcodeproj/project.pbxproj
index 8ca39de6..a9ab6bb8 100644
--- a/opennurbs_public.xcodeproj/project.pbxproj
+++ b/opennurbs_public.xcodeproj/project.pbxproj
@@ -1239,7 +1239,7 @@
1DB028051ED6421900FA9144 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0830;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1DB0280C1ED6421900FA9144 = {
@@ -1250,9 +1250,10 @@
};
buildConfigurationList = 1DB028081ED6421900FA9144 /* Build configuration list for PBXProject "opennurbs_public" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1DB028041ED6421900FA9144;
@@ -1463,15 +1464,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -1511,15 +1520,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/opennurbs_public_version.h b/opennurbs_public_version.h
index 435594d8..cdc0503c 100644
--- a/opennurbs_public_version.h
+++ b/opennurbs_public_version.h
@@ -6,7 +6,7 @@
// To update version numbers, edit ..\build\build_dates.msbuild
#define RMA_VERSION_MAJOR 6
-#define RMA_VERSION_MINOR 14
+#define RMA_VERSION_MINOR 15
////////////////////////////////////////////////////////////////
//
@@ -14,10 +14,10 @@
// first step in each build.
//
#define RMA_VERSION_YEAR 2019
-#define RMA_VERSION_MONTH 4
-#define RMA_VERSION_DATE 23
-#define RMA_VERSION_HOUR 21
-#define RMA_VERSION_MINUTE 44
+#define RMA_VERSION_MONTH 6
+#define RMA_VERSION_DATE 7
+#define RMA_VERSION_HOUR 19
+#define RMA_VERSION_MINUTE 45
////////////////////////////////////////////////////////////////
//
@@ -35,19 +35,19 @@
// 3 = build system release build
#define RMA_VERSION_BRANCH 0
-#define VERSION_WITH_COMMAS 6,14,19113,21440
-#define VERSION_WITH_PERIODS 6.14.19113.21440
+#define VERSION_WITH_COMMAS 6,15,19158,19450
+#define VERSION_WITH_PERIODS 6.15.19158.19450
#define COPYRIGHT "Copyright (C) 1993-2019, Robert McNeel & Associates. All Rights Reserved."
#define SPECIAL_BUILD_DESCRIPTION "Public OpenNURBS C++ 3dm file IO library."
#define RMA_VERSION_NUMBER_MAJOR_STRING "6"
#define RMA_VERSION_NUMBER_MAJOR_WSTRING L"6"
-#define RMA_VERSION_NUMBER_SR_STRING "SR14"
-#define RMA_VERSION_NUMBER_SR_WSTRING L"SR14"
+#define RMA_VERSION_NUMBER_SR_STRING "SR15"
+#define RMA_VERSION_NUMBER_SR_WSTRING L"SR15"
-#define RMA_VERSION_WITH_PERIODS_STRING "6.14.19113.21440"
-#define RMA_VERSION_WITH_PERIODS_WSTRING L"6.14.19113.21440"
+#define RMA_VERSION_WITH_PERIODS_STRING "6.15.19158.19450"
+#define RMA_VERSION_WITH_PERIODS_WSTRING L"6.15.19158.19450"
diff --git a/opennurbs_sort.cpp b/opennurbs_sort.cpp
index f1f0b3c2..9431fd85 100644
--- a/opennurbs_sort.cpp
+++ b/opennurbs_sort.cpp
@@ -63,7 +63,7 @@ ON_qsort( void *base, size_t nel, size_t width, int (*compar)(void*,const void *
// find pivots, that calculation must be thread safe.
#if defined(ON_COMPILER_MSC)
qsort_s(base,nel,width,compar,context);
-#elif defined(ON_RUNTIME_ANDROID)
+#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
ON_hsort(base, nel, width, compar, context);
#elif defined(ON_COMPILER_CLANG)
qsort_r(base,nel,width,context,compar);
diff --git a/opennurbs_string_format.cpp b/opennurbs_string_format.cpp
index 5355b2ff..805be8d7 100644
--- a/opennurbs_string_format.cpp
+++ b/opennurbs_string_format.cpp
@@ -803,11 +803,11 @@ int ON_String::FormatVargsIntoBuffer(
if (0 == buffer || buffer_capacity <= 0)
return -1;
buffer[0] = 0;
-#if defined(ON_COMPILER_CLANG)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
// CLang modifies args so a copy is required
va_list args_copy;
va_copy (args_copy, args);
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
int len = vsnprintf(buffer, buffer_capacity, format, args_copy);
#else
int len = vsnprintf_l(buffer, buffer_capacity, ON_Locale::Ordinal.NumericLocalePtr(), format, args_copy);
@@ -854,12 +854,12 @@ int ON_String::FormatVargsOutputCount(
if ( nullptr == format || 0 == format[0] )
return 0;
-#if defined(ON_COMPILER_CLANG)
+#if defined(ON_COMPILER_CLANG) || defined(ON_COMPILER_GNU)
// CLang modifies args so a copy is required
va_list args_copy;
va_copy (args_copy, args);
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
int len = vsnprintf(nullptr, 0, format, args_copy);
#else
int len = vsnprintf_l(nullptr, 0, ON_Locale::Ordinal.NumericLocalePtr(), format, args_copy);
@@ -1075,10 +1075,18 @@ int ON_wString::FormatVargsIntoBuffer(
int len = vswprintf(buffer, buffer_capacity, format, args_copy);
va_end(args_copy);
+#else
+
+#if defined(ON_COMPILER_GNU)
+ va_list args_copy;
+ va_copy (args_copy, args);
+ int len = vswprintf(buffer, buffer_capacity, format, args_copy);
+ va_end(args_copy);
#else
// Using ON_Locale::Ordinal.NumericLocalePtr() insures that a period
// will be use for the decimal point in formatted printing.
int len = _vswprintf_p_l(buffer, buffer_capacity, format, ON_Locale::Ordinal.NumericLocalePtr(), args);
+#endif
#endif
if (((size_t)len) >= buffer_capacity)
len = -1;
@@ -1214,9 +1222,38 @@ int ON_wString::FormatVargsOutputCount(
break;
}
return -1;
+#else
+#if defined(ON_COMPILER_GNU)
+ wchar_t stack_buffer[1024];
+ ON_wStringBuffer buffer(stack_buffer, sizeof(stack_buffer) / sizeof(stack_buffer[0]));
+ size_t buffer_capacity = buffer.m_buffer_capacity;
+ for(;;)
+ {
+ va_list args_copy;
+ va_copy(args_copy, args);
+
+ const int formatted_string_count = vswprintf(buffer.m_buffer, buffer.m_buffer_capacity, format, args_copy);
+ va_end(args_copy);
+ if (formatted_string_count >= 0)
+ {
+ // formatted_string_count = number of wchar_t elements not including null terminator
+ return formatted_string_count;
+ }
+ if ( buffer_capacity >= 1024*16*16*16 )
+ break;
+ buffer_capacity *= 16;
+ if (false == buffer.GrowBuffer(buffer_capacity))
+ break;
+ if (nullptr == buffer.m_buffer)
+ break;
+ if (buffer_capacity < buffer.m_buffer_capacity)
+ break;
+ }
+ return -1;
#else
// Using ON_Locale::Ordinal.NumericLocalePtr() insures that a period
// will be use for the decimal point in formatted printing.
return _vscwprintf_p_l(format, ON_Locale::Ordinal.NumericLocalePtr(), args);
#endif
+#endif
}
diff --git a/opennurbs_string_scan.cpp b/opennurbs_string_scan.cpp
index 177f6020..539d95d4 100644
--- a/opennurbs_string_scan.cpp
+++ b/opennurbs_string_scan.cpp
@@ -85,8 +85,8 @@ int ON_String::ScanBufferVargs(
va_list args
)
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
if (nullptr == buffer || nullptr == format)
return -1;
return vsscanf(buffer, format, args);
@@ -148,8 +148,8 @@ int ON_wString::ScanBufferVargs(
va_list args
)
{
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
if (nullptr == buffer || nullptr == format)
return -1;
return swscanf(buffer, format, args);
@@ -397,8 +397,8 @@ const char* ON_String::ToNumber(
local_buffer[local_buffer_count++] = 0;
double x = value_on_failure;
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
if (1 == sscanf(local_buffer, "%lg", &x))
{
*value = x;
@@ -639,8 +639,8 @@ const wchar_t* ON_wString::ToNumber(
local_buffer[local_buffer_count++] = 0;
double x = value_on_failure;
-#if defined(ON_COMPILER_CLANG)
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
if (1 == sscanf(local_buffer, "%lg", &x))
{
*value = x;
diff --git a/opennurbs_subd.cpp b/opennurbs_subd.cpp
index 505ec855..1674b96a 100644
--- a/opennurbs_subd.cpp
+++ b/opennurbs_subd.cpp
@@ -11277,6 +11277,9 @@ unsigned int ON_SubD::SetVertexTags(
const ON_SubDEdge* edge = ON_SUBD_EDGE_POINTER(vertex->m_edges[vei].m_ptr);
if (nullptr == edge)
continue;
+#pragma ON_PRAGMA_WARNING_PUSH
+#pragma ON_PRAGMA_WARNING_DISABLE_CLANG("-Wtautological-compare")
+#pragma ON_PRAGMA_WARNING_DISABLE_GNU("-Wtautological-compare")
// The next if (min_face_count > min_face_count) should be if (min_face_count > max_face_count)
// and is a bug that will not be fixed in 6.x because it exposes other bugs below.
// Without the fix, max_face_count is always 0xFFFEU and the continue always occurs.
@@ -11290,6 +11293,7 @@ unsigned int ON_SubD::SetVertexTags(
min_face_count = edge->m_face_count;
else if (edge->m_face_count > max_face_count)
max_face_count = edge->m_face_count;
+#pragma ON_PRAGMA_WARNING_POP
}
if (max_face_count > 2)
diff --git a/opennurbs_subd_heap.cpp b/opennurbs_subd_heap.cpp
index 47d31a1a..6f6ca300 100644
--- a/opennurbs_subd_heap.cpp
+++ b/opennurbs_subd_heap.cpp
@@ -660,7 +660,7 @@ bool ON_SubD_FixedSizeHeap::ReturnPtrArray(
m_p_index -= capacity;
return true;
}
- return ON_SUBD_RETURN_ERROR(nullptr);
+ return ON_SUBD_RETURN_ERROR(false);
}
diff --git a/opennurbs_system.h b/opennurbs_system.h
index e2ff70a5..504fea2f 100644
--- a/opennurbs_system.h
+++ b/opennurbs_system.h
@@ -540,7 +540,7 @@ typedef ON__UINT32 wchar_t;
#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE
#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
-#if defined(ON_RUNTIME_ANDROID)
+#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
#include "android_uuid/uuid.h"
#else
#include
@@ -618,9 +618,6 @@ typedef ON__UINT32 wchar_t;
#if defined(ON_RUNTIME_APPLE)
-// To handle single stroke fonts on MacOS, we need freetype tools.
-// See ON_AppleFontGetGlyphOutline() for details.
-// freetype linking is broken in current project // #define OPENNURBS_FREETYPE_SUPPORT
#if defined(ON_COMPILER_CLANG)
#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE
diff --git a/opennurbs_system_compiler.h b/opennurbs_system_compiler.h
index 654fc0d4..c03e7694 100644
--- a/opennurbs_system_compiler.h
+++ b/opennurbs_system_compiler.h
@@ -247,7 +247,7 @@
#define ON_SIZEOF_WCHAR_T 2
-#elif defined(__clang__) | defined(ON_COMPILER_CLANG)
+#elif defined(__clang__) | defined(__clang) | defined(ON_COMPILER_CLANG)
/*
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
diff --git a/opennurbs_system_runtime.h b/opennurbs_system_runtime.h
index 70819ddf..83d1b87b 100644
--- a/opennurbs_system_runtime.h
+++ b/opennurbs_system_runtime.h
@@ -55,6 +55,11 @@
#define ON_RUNTIME_ANDROID
#endif
+#elif defined(__linux__)
+#if !defined(ON_RUNTIME_LINUX)
+#define ON_RUNTIME_LINUX
+#endif
+
#endif
/*
//
@@ -150,6 +155,25 @@
#define ON_SIZEOF_WCHAR_T 4
#endif
+#elif defined(ON_RUNTIME_LINUX)
+
+#if defined(__x86_64__)
+#define ON_64BIT_RUNTIME
+#else
+#define ON_32BIT_RUNTIME
+#endif
+
+
+#if !defined(ON_SIZEOF_WCHAR_T)
+#define ON_SIZEOF_WCHAR_T 4
+#endif
+
+#if !defined(ON_LITTLE_ENDIAN)
+#if defined( __x86_64__ )
+#define ON_LITTLE_ENDIAN
+#endif
+#endif
+
#endif
#if !defined(ON_64BIT_RUNTIME) && !defined(ON_32BIT_RUNTIME)
diff --git a/opennurbs_text.cpp b/opennurbs_text.cpp
index 6c702922..c308b254 100644
--- a/opennurbs_text.cpp
+++ b/opennurbs_text.cpp
@@ -593,7 +593,7 @@ bool ON_TextContent::Create(
case ON::AnnotationType::Diameter:
case ON::AnnotationType::Radius:
h_align = dimstyle->LeaderTextHorizontalAlignment();
- v_align = dimstyle->LeaderTextVerticalAlignment();
+ v_align = ON::TextVerticalAlignment::MiddleOfTop; //dimstyle->LeaderTextVerticalAlignment();
break;
}
diff --git a/opennurbs_uuid.cpp b/opennurbs_uuid.cpp
index 44f75a65..cb5bced4 100644
--- a/opennurbs_uuid.cpp
+++ b/opennurbs_uuid.cpp
@@ -15,7 +15,9 @@
*/
#include "opennurbs.h"
-
+#if defined(ON_RUNTIME_LINUX)
+#include "android_uuid/uuid.h"
+#endif
#if !defined(ON_COMPILING_OPENNURBS)
// This check is included in all opennurbs source .c and .cpp files to insure
// ON_COMPILING_OPENNURBS is defined when opennurbs source is compiled.
@@ -221,6 +223,12 @@ bool ON_CreateUuid( ON_UUID& new_uuid )
return true;
#else
+
+#if defined(ON_RUNTIME_LINUX)
+ uuid_generate((unsigned char*)&new_uuid);
+ return true;
+#else
+
// You must supply a way to create unique ids or you
// will not be able to write 3dm files.
#error TODO - generate uuid
@@ -228,6 +236,7 @@ bool ON_CreateUuid( ON_UUID& new_uuid )
return false;
#endif
+#endif
#endif
}
diff --git a/zlib/deflate.c b/zlib/deflate.c
index 12e94ff0..2a7c688f 100644
--- a/zlib/deflate.c
+++ b/zlib/deflate.c
@@ -1129,7 +1129,8 @@ local uInt longest_match(s, cur_match)
* are always equal when the other bytes match, given that
* the hash keys are equal and that HASH_BITS >= 8.
*/
- scan += 2, match++;
+ scan += 2;
+ match++;
Assert(*scan == *match, "match[2]?");
/* We check for insufficient lookahead only every 8th comparison;
@@ -1202,7 +1203,8 @@ local uInt longest_match_fast(s, cur_match)
* are always equal when the other bytes match, given that
* the hash keys are equal and that HASH_BITS >= 8.
*/
- scan += 2, match += 2;
+ scan += 2;
+ match += 2;
Assert(*scan == *match, "match[2]?");
/* We check for insufficient lookahead only every 8th comparison;
@@ -1582,7 +1584,8 @@ local block_state deflate_slow(s, flush)
/* Find the longest match, discarding those <= prev_length.
*/
- s->prev_length = s->match_length, s->prev_match = s->match_start;
+ s->prev_length = s->match_length;
+ s->prev_match = s->match_start;
s->match_length = MIN_MATCH-1;
if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
diff --git a/zlib/opennurbs_public_zlib.xcodeproj/project.pbxproj b/zlib/opennurbs_public_zlib.xcodeproj/project.pbxproj
index ae49d584..66530269 100644
--- a/zlib/opennurbs_public_zlib.xcodeproj/project.pbxproj
+++ b/zlib/opennurbs_public_zlib.xcodeproj/project.pbxproj
@@ -167,7 +167,7 @@
1DB028151ED6430300FA9144 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0900;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "OpenNURBS 3dm File IO Toolkit";
TargetAttributes = {
1DB0281C1ED6430300FA9144 = {
@@ -178,9 +178,10 @@
};
buildConfigurationList = 1DB028181ED6430300FA9144 /* Build configuration list for PBXProject "opennurbs_public_zlib" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = 1DB028141ED6430300FA9144;
@@ -225,15 +226,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -273,15 +282,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -330,15 +347,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
diff --git a/zlib/trees.c b/zlib/trees.c
index 66cad63b..c195c519 100644
--- a/zlib/trees.c
+++ b/zlib/trees.c
@@ -527,7 +527,7 @@ local void gen_bitlen(s, desc)
for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
n = s->heap[h];
bits = tree[tree[n].Dad].Len + 1;
- if (bits > max_length) bits = max_length, overflow++;
+ if (bits > max_length) {bits = max_length; overflow++;}
tree[n].Len = (ush)bits;
/* We overwrite tree[n].Dad which is no longer needed */
@@ -644,7 +644,8 @@ local void build_tree(s, desc)
* heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
* heap[0] is not used.
*/
- s->heap_len = 0, s->heap_max = HEAP_SIZE;
+ s->heap_len = 0;
+ s->heap_max = HEAP_SIZE;
for (n = 0; n < elems; n++) {
if (tree[n].Freq != 0) {
@@ -730,7 +731,7 @@ local void scan_tree (s, tree, max_code)
int max_count = 7; /* max repeat count */
int min_count = 4; /* min repeat count */
- if (nextlen == 0) max_count = 138, min_count = 3;
+ if (nextlen == 0) {max_count = 138; min_count = 3;}
tree[max_code+1].Len = (ush)0xffff; /* guard */
for (n = 0; n <= max_code; n++) {
@@ -749,11 +750,11 @@ local void scan_tree (s, tree, max_code)
}
count = 0; prevlen = curlen;
if (nextlen == 0) {
- max_count = 138, min_count = 3;
+ max_count = 138; min_count = 3;
} else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
+ max_count = 6; min_count = 3;
} else {
- max_count = 7, min_count = 4;
+ max_count = 7; min_count = 4;
}
}
}
@@ -776,7 +777,7 @@ local void send_tree (s, tree, max_code)
int min_count = 4; /* min repeat count */
/* tree[max_code+1].Len = -1; */ /* guard already set */
- if (nextlen == 0) max_count = 138, min_count = 3;
+ if (nextlen == 0) {max_count = 138; min_count = 3;}
for (n = 0; n <= max_code; n++) {
curlen = nextlen; nextlen = tree[n+1].Len;
@@ -800,11 +801,11 @@ local void send_tree (s, tree, max_code)
}
count = 0; prevlen = curlen;
if (nextlen == 0) {
- max_count = 138, min_count = 3;
+ max_count = 138; min_count = 3;
} else if (curlen == nextlen) {
- max_count = 6, min_count = 3;
+ max_count = 6; min_count = 3;
} else {
- max_count = 7, min_count = 4;
+ max_count = 7; min_count = 4;
}
}
}
@@ -1162,8 +1163,9 @@ local unsigned bi_reverse(code, len)
{
register unsigned res = 0;
do {
- res |= code & 1;
- code >>= 1, res <<= 1;
+ res |= code & 1;
+ code >>= 1;
+ res <<= 1;
} while (--len > 0);
return res >> 1;
}