ObjFW  Check-in [ae340607fd]

Overview
Comment:Several minor style fixes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ae340607fd0d02747c12e938c8b289410c56f52baf3fc7e8583870e085448643
User & Date: js on 2017-01-06 23:42:09
Other Links: manifest | tags
Context
2017-01-06
23:59
Add more _Nonnull to make Clang 4.0 happy check-in: b56ef2c415 user: js tags: trunk
23:42
Several minor style fixes check-in: ae340607fd user: js tags: trunk
2016-12-25
00:53
Use -Werror=deprecated for the readdir_r check check-in: c74cbb9d07 user: js tags: trunk
Changes

Modified src/OFHTTPRequest.m from [d5d8e0508a] to [4f3aac88d0].

185
186
187
188
189
190
191
192
193
194
195




196
197
198
199
200
201
202
185
186
187
188
189
190
191




192
193
194
195
196
197
198
199
200
201
202







-
-
-
-
+
+
+
+








	return hash;
}

- (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion
{
	if (protocolVersion.major != 1 || protocolVersion.minor > 1)
		@throw [OFUnsupportedVersionException
		    exceptionWithVersion: [OFString stringWithFormat: @"%u.%u",
					      protocolVersion.major,
					      protocolVersion.minor]];
		@throw [OFUnsupportedVersionException exceptionWithVersion:
		    [OFString stringWithFormat: @"%u.%u",
						protocolVersion.major,
						protocolVersion.minor]];

	_protocolVersion = protocolVersion;
}

- (of_http_request_protocol_version_t)protocolVersion
{
	return _protocolVersion;
224
225
226
227
228
229
230
231


232
233
234
235
236
237
238
224
225
226
227
228
229
230

231
232
233
234
235
236
237
238
239







-
+
+







	[self setProtocolVersion: protocolVersion];

	objc_autoreleasePoolPop(pool);
}

- (OFString*)protocolVersionString
{
	return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major,
	return [OFString stringWithFormat: @"%u.%u",
					   _protocolVersion.major,
					   _protocolVersion.minor];
}

- (void)setBodyFromString: (OFString*)string
{
	[self setBodyFromString: string
		       encoding: OF_STRING_ENCODING_UTF_8];

Modified src/OFHTTPResponse.m from [fba0f74375] to [c43f43e3e9].

48
49
50
51
52
53
54
55
56
57
58




59
60
61
62
63
64
65
48
49
50
51
52
53
54




55
56
57
58
59
60
61
62
63
64
65







-
-
-
-
+
+
+
+








	[super dealloc];
}

- (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion
{
	if (protocolVersion.major != 1 || protocolVersion.minor > 1)
		@throw [OFUnsupportedVersionException
		    exceptionWithVersion: [OFString stringWithFormat: @"%u.%u",
					      protocolVersion.major,
					      protocolVersion.minor]];
		@throw [OFUnsupportedVersionException exceptionWithVersion:
		    [OFString stringWithFormat: @"%u.%u",
						protocolVersion.major,
						protocolVersion.minor]];

	_protocolVersion = protocolVersion;
}

- (of_http_request_protocol_version_t)protocolVersion
{
	return _protocolVersion;
87
88
89
90
91
92
93
94


95
96
97
98
99
100
101
87
88
89
90
91
92
93

94
95
96
97
98
99
100
101
102







-
+
+







	[self setProtocolVersion: protocolVersion];

	objc_autoreleasePoolPop(pool);
}

- (OFString*)protocolVersionString
{
	return [OFString stringWithFormat: @"%u.%u", _protocolVersion.major,
	return [OFString stringWithFormat: @"%u.%u",
					   _protocolVersion.major,
					   _protocolVersion.minor];
}

- (OFString*)string
{
	return [self stringWithEncoding: OF_STRING_ENCODING_AUTODETECT];
}

Modified src/OFNumber.m from [39c49eaec8] to [114905a94e].

909
910
911
912
913
914
915
916

917
918
919
920
921
922
923
924
909
910
911
912
913
914
915

916

917
918
919
920
921
922
923







-
+
-







		if (![ret containsString: @"."])
			[ret appendString: @".0"];

		[ret makeImmutable];

		return ret;
	case OF_NUMBER_TYPE_DOUBLE:
		ret = [OFMutableString stringWithFormat: @"%g",
		ret = [OFMutableString stringWithFormat: @"%g", _value.double_];
							 _value.double_];

		if (![ret containsString: @"."])
			[ret appendString: @".0"];

		[ret makeImmutable];

		return ret;