Fix access restrictions that were causing VC++'s brain to fizzle when compiled with NEW_STRING_APIS. r=scc

This commit is contained in:
waterson%netscape.com 2000-03-29 00:13:46 +00:00
parent 5b54400caf
commit d98332652c
2 changed files with 10 additions and 21 deletions

View File

@ -37,7 +37,7 @@
class nsInt64
{
private:
public: //XXX should be private
PRInt64 mValue;
public:
@ -134,11 +134,6 @@ public:
}
// Arithmetic operators
friend const nsInt64 operator +(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator -(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator *(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator /(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator %(const nsInt64& aObject1, const nsInt64& aObject2);
/**
* Increment a 64-bit integer by a 64-bit integer amount.
@ -181,17 +176,14 @@ public:
}
// Comparison operators
friend PRBool operator ==(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator !=(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator >(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator >=(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator <(const nsInt64& aObject1, const nsInt64& aObject2);
friend PRBool operator <=(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator ==(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator !=(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator >(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator >=(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator <(const nsInt64& aObject1, const nsInt64& aObject2);
friend inline PRBool operator <=(const nsInt64& aObject1, const nsInt64& aObject2);
// Bitwise operators
friend const nsInt64 operator &(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator |(const nsInt64& aObject1, const nsInt64& aObject2);
friend const nsInt64 operator ^(const nsInt64& aObject1, const nsInt64& aObject2);
/**
* Compute the bitwise NOT of a 64-bit integer

View File

@ -38,7 +38,7 @@
class nsTime
{
private:
public: //XXX should be private
nsInt64 mValue;
public:
@ -95,6 +95,8 @@ public:
return mValue;
}
// Arithmetic operators
/**
* Subtract a 64-bit interval from a time.
*/
@ -111,11 +113,6 @@ public:
return *this;
}
// Arithmetic operators
friend const nsTime operator +(const nsTime& aTime, const nsInt64& aInterval);
friend const nsTime operator -(const nsTime& aTime, const nsInt64& aInterval);
friend const nsInt64 operator -(const nsTime& aTime1, const nsTime& aTime2);
// Comparison operators
friend const PRBool operator ==(const nsTime& aTime1, const nsTime& aTime2);
friend const PRBool operator !=(const nsTime& aTime1, const nsTime& aTime2);