From 72a41fbb9f1bb0b3fd6a42eadd48ff8e89126a32 Mon Sep 17 00:00:00 2001 From: "waldemar%netscape.com" Date: Sat, 6 May 2000 03:47:35 +0000 Subject: [PATCH] Fixed syntax errors git-svn-id: svn://10.0.0.236/trunk@68491 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/js2/utilities.h | 12 ++++++------ mozilla/js2/src/utilities.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mozilla/js/js2/utilities.h b/mozilla/js/js2/utilities.h index a8cc0acef8e..a1a3fbb9e2b 100644 --- a/mozilla/js/js2/utilities.h +++ b/mozilla/js/js2/utilities.h @@ -1045,8 +1045,8 @@ namespace JavaScript { struct ListQueue: private ListQueueEntry { ListQueue() {next = this; prev = this;} - operator bool() const {return next != this;} // Return true if the ListQueue is nonempty - bool operator !() const {return next == this;} // Return true if the ListQueue is empty + operator bool() const {return next != static_cast(this);} // Return true if the ListQueue is nonempty + bool operator !() const {return next == static_cast(this);} // Return true if the ListQueue is empty E &front() const {ASSERT(operator bool()); return *static_cast(next);} E &back() const {ASSERT(operator bool()); return *static_cast(prev);} @@ -1311,6 +1311,10 @@ namespace JavaScript { class PrettyPrinter: public Formatter { public: STATIC_CONST(uint32, unlimitedLineWidth = 0x7FFFFFFF); + class Region; + class Indent; + class Block; + private: STATIC_CONST(uint32, infiniteLength = 0x80000000); const uint32 lineWidth; // Current maximum desired line width @@ -1329,10 +1333,6 @@ namespace JavaScript { ArrayBuffer savedBlocks; // Stack of saved information about partially printed blocks // Variables for the front end that calculates block sizes - class Region; - class Indent; - class Block; - struct Item: ListQueueEntry { enum Kind {text, blockBegin, indentBlockBegin, blockEnd, indent, linearBreak, fillBreak}; diff --git a/mozilla/js2/src/utilities.h b/mozilla/js2/src/utilities.h index a8cc0acef8e..a1a3fbb9e2b 100644 --- a/mozilla/js2/src/utilities.h +++ b/mozilla/js2/src/utilities.h @@ -1045,8 +1045,8 @@ namespace JavaScript { struct ListQueue: private ListQueueEntry { ListQueue() {next = this; prev = this;} - operator bool() const {return next != this;} // Return true if the ListQueue is nonempty - bool operator !() const {return next == this;} // Return true if the ListQueue is empty + operator bool() const {return next != static_cast(this);} // Return true if the ListQueue is nonempty + bool operator !() const {return next == static_cast(this);} // Return true if the ListQueue is empty E &front() const {ASSERT(operator bool()); return *static_cast(next);} E &back() const {ASSERT(operator bool()); return *static_cast(prev);} @@ -1311,6 +1311,10 @@ namespace JavaScript { class PrettyPrinter: public Formatter { public: STATIC_CONST(uint32, unlimitedLineWidth = 0x7FFFFFFF); + class Region; + class Indent; + class Block; + private: STATIC_CONST(uint32, infiniteLength = 0x80000000); const uint32 lineWidth; // Current maximum desired line width @@ -1329,10 +1333,6 @@ namespace JavaScript { ArrayBuffer savedBlocks; // Stack of saved information about partially printed blocks // Variables for the front end that calculates block sizes - class Region; - class Indent; - class Block; - struct Item: ListQueueEntry { enum Kind {text, blockBegin, indentBlockBegin, blockEnd, indent, linearBreak, fillBreak};