AutoDeleter: do not allow copy
Change-Id: Ieab0fea46fc23c446bbaca407e3e80a4a7901896 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2704 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -80,6 +80,10 @@ public:
|
||||
protected:
|
||||
C *fObject;
|
||||
DeleteFunc fDelete;
|
||||
|
||||
private:
|
||||
AutoDeleter(const AutoDeleter&);
|
||||
AutoDeleter& operator=(const AutoDeleter&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -265,8 +265,8 @@ BDateFormat::GetStartOfWeek(BWeekday* startOfWeek) const
|
||||
return B_BAD_VALUE;
|
||||
|
||||
UErrorCode err = U_ZERO_ERROR;
|
||||
ObjectDeleter<Calendar> calendar = Calendar::createInstance(
|
||||
*BFormattingConventions::Private(&fConventions).ICULocale(), err);
|
||||
ObjectDeleter<Calendar> calendar(Calendar::createInstance(
|
||||
*BFormattingConventions::Private(&fConventions).ICULocale(), err));
|
||||
|
||||
if (U_FAILURE(err))
|
||||
return B_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user