ObjFW  Diff

Differences From Artifact [0176c8e382]:

To Artifact [01f9bb127a]:


652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668

669
670
671
672
673
674
675
676
677
					   encoding: encoding] autorelease];
}
#endif

+ (OFString*)pathWithComponents: (OFArray*)components
{
	OFMutableString *ret = [OFMutableString string];
	void *pool = objc_autoreleasePoolPush();
	OFEnumerator *enumerator = [components objectEnumerator];
	OFString *component;

	if ((component = [enumerator nextObject]) != nil)
		[ret appendString: component];
	while ((component = [enumerator nextObject]) != nil) {
		[ret appendString: OF_PATH_DELIMITER_STRING];
		[ret appendString: component];
	}


	objc_autoreleasePoolPop(pool);

	return ret;
}

- init
{
	if (object_getClass(self) == [OFString class]) {







|
|
|
|
<
|
|
<

|
>
|
<







652
653
654
655
656
657
658
659
660
661
662

663
664

665
666
667
668

669
670
671
672
673
674
675
					   encoding: encoding] autorelease];
}
#endif

+ (OFString*)pathWithComponents: (OFArray*)components
{
	OFMutableString *ret = [OFMutableString string];
	bool first = true;

	for (OFString *component in components) {
		if (!first)

			[ret appendString: OF_PATH_DELIMITER_STRING];


		[ret appendString: component];

		first = false;
	}


	return ret;
}

- init
{
	if (object_getClass(self) == [OFString class]) {