mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Bug 1399756 - (More) Code clean-up: Style nits, typos and trailing spaces
Tag #1273
This commit is contained in:
parent
c021f0c983
commit
8ccc206d44
13 changed files with 21 additions and 21 deletions
|
|
@ -303,7 +303,7 @@ typedef void (* mdbYarn_mGrow)(mdbYarn* self, mdb_size inNewSize);
|
|||
**| original mdbYarn instance decides whether a grow method is necessary
|
||||
**| or desirable, and uses only grow methods suitable for the buffering
|
||||
**| nature of a specific mdbYarn instance. (For example, Buf might be a
|
||||
**| staticly allocated string space which switches to something heap-based
|
||||
**| statically allocated string space which switches to something heap-based
|
||||
**| when grown, and subsequent calls to grow the yarn must distinguish the
|
||||
**| original static string from heap allocated space, etc.) Note that the
|
||||
**| method stored in mYarn_Grow can change, and this might be a common way
|
||||
|
|
@ -1255,7 +1255,7 @@ public:
|
|||
**| not intended to nest. (If small transactions were nested inside large
|
||||
**| transactions, that would imply that a single large transaction must be
|
||||
**| atomic over all the contained small transactions; but actually we intend
|
||||
**| smalls transaction never be undone once commited due to, say, aborting a
|
||||
**| smalls transaction never be undone once committed due to, say, aborting a
|
||||
**| transaction of greater significance.) The small, large, and session level
|
||||
**| commits have equal granularity, and differ only in risk of loss from the
|
||||
**| perspective of an application. Small commits characterize changes that
|
||||
|
|
@ -1273,13 +1273,13 @@ public:
|
|||
**|
|
||||
**|| aborts: the only way to abort changes to a store is by closing the store.
|
||||
**| So there is no specific method for causing any abort. Stores must discard
|
||||
**| all changes made that are uncommited when a store is closed. This design
|
||||
**| all changes made that are uncommitted when a store is closed. This design
|
||||
**| choice makes the implementations of tables, rows, and cells much less
|
||||
**| complex because they need not maintain a record of undobable changes. When
|
||||
**| a store is closed, presumably this precipitates the closure of all tables,
|
||||
**| rows, and cells in the store as well. So an application can revert the
|
||||
**| state of a store in the user interface by quietly closing and reopening a
|
||||
**| store, because this will discard uncommited changes and show old content.
|
||||
**| store, because this will discard uncommitted changes and show old content.
|
||||
**| This implies an app that closes a store will need to send a "scramble"
|
||||
**| event notification to any views that depend on old discarded content.
|
||||
|*/
|
||||
|
|
@ -1339,7 +1339,7 @@ public:
|
|||
mdb_scope inRowScope, // row scope for row ids
|
||||
nsIMdbRow** acqRow) = 0; // create new row
|
||||
// Note this row must be added to some table or cell child before the
|
||||
// store is closed in order to make this row persist across sesssions.
|
||||
// store is closed in order to make this row persist across sessions.
|
||||
|
||||
// } ----- end row methods -----
|
||||
|
||||
|
|
@ -1894,7 +1894,7 @@ public:
|
|||
// the column which is actually sorted by ioSorting. This method
|
||||
// is most useful in conjunction with nsIMdbSorting::SetCompare(),
|
||||
// because otherwise a caller would not be able to override the
|
||||
// comparison ordering method used during searchs. Note that some
|
||||
// comparison ordering method used during searches. Note that some
|
||||
// database implementations might be unable to use an arbitrarily
|
||||
// specified sort order, either due to schema or runtime interface
|
||||
// constraints, in which case ioSorting might not actually be used.
|
||||
|
|
@ -2401,7 +2401,7 @@ public:
|
|||
//
|
||||
// This is an alternative to the GetYarn() method, which has copy semantics
|
||||
// only; AliasYarn() relaxes a robust safety principle only for performance
|
||||
// reasons, to accomodate the need for callers to transform text content to
|
||||
// reasons, to accommodate the need for callers to transform text content to
|
||||
// some other canonical representation that would necessitate an additional
|
||||
// copy and transformation when such is incompatible with the mdbYarn format.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
**| so that we care less whether the shortest hex representation is used.
|
||||
**| So we start all IDs for 'over' category tokens at a value range that
|
||||
**| needs at least four hex digits, so we can reserve three hex digits and
|
||||
**| shorter for more commonly occuring tokens in the 'under' category.
|
||||
**| shorter for more commonly occurring tokens in the 'under' category.
|
||||
|*/
|
||||
#define morkAtomSpace_kMinOverId 0x1000 /* using at least four hex bytes */
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ public: // typesafe refcounting inlines calling inherited morkNode methods
|
|||
**| linked list, and following slots to provide extra footprint that might
|
||||
**| be needed by any morkHandle subclasses that include very little extra
|
||||
**| space (by virtue of the fact that each morkHandle subclass is expected
|
||||
**| to multiply inherit from another base class that has only abstact methods
|
||||
**| to multiply inherit from another base class that has only abstract methods
|
||||
**| for space overhead related only to some vtable representation).
|
||||
|*/
|
||||
class morkHandleFrame {
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ nsresult morkNode::CloseMdbObject(morkEnv *ev)
|
|||
/*public virtual*/
|
||||
morkNode::~morkNode() // assert that CloseNode() executed earlier
|
||||
{
|
||||
MORK_ASSERT(this->IsShutNode() || IsDeadNode()); // sometimes we call destructor explictly w/o freeing object.
|
||||
MORK_ASSERT(this->IsShutNode() || IsDeadNode()); // sometimes we call destructor explicitly w/o freeing object.
|
||||
mNode_Access = morkAccess_kDead;
|
||||
mNode_Usage = morkUsage_kNone;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ public: // inlines
|
|||
#define morkParser_kTag /*i*/ 0x70417253 /* ascii 'pArS' */
|
||||
|
||||
// These are states for the simple parsing virtual machine. Needless to say,
|
||||
// these must be distinct, and preferrably in a contiguous integer range.
|
||||
// these must be distinct, and preferably in a contiguous integer range.
|
||||
// Don't change these constants without looking at switch statements in code.
|
||||
#define morkParser_kCellState 0 /* cell is tightest scope */
|
||||
#define morkParser_kMetaState 1 /* meta is tightest scope */
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class morkFarBookAtom;
|
|||
|
||||
/*| morkPool: a place to manage pools of non-node objects that are memory
|
||||
**| managed out of large chunks of space, so that per-object management
|
||||
**| space overhead has no signficant cost.
|
||||
**| space overhead has no significant cost.
|
||||
|*/
|
||||
class morkPool : public morkNode {
|
||||
|
||||
|
|
|
|||
|
|
@ -2091,7 +2091,7 @@ morkStore::NewRow(nsIMdbEnv* mev, // new row with db assigned oid
|
|||
mdb_scope inRowScope, // row scope for row ids
|
||||
nsIMdbRow** acqRow) // create new row
|
||||
// Note this row must be added to some table or cell child before the
|
||||
// store is closed in order to make this row persist across sesssions.
|
||||
// store is closed in order to make this row persist across sessions.
|
||||
{
|
||||
nsresult outErr = NS_OK;
|
||||
nsIMdbRow* outRow = 0;
|
||||
|
|
|
|||
|
|
@ -412,7 +412,7 @@ public: // other port methods
|
|||
mdb_scope inRowScope, // row scope for row ids
|
||||
nsIMdbRow** acqRow) override; // create new row
|
||||
// Note this row must be added to some table or cell child before the
|
||||
// store is closed in order to make this row persist across sesssions.
|
||||
// store is closed in order to make this row persist across sessions.
|
||||
|
||||
// } ----- end row methods -----
|
||||
|
||||
|
|
@ -645,7 +645,7 @@ public: // typing
|
|||
static void NilStoreFileError(morkEnv* ev);
|
||||
static void CannotAutoAssignAtomIdentityError(morkEnv* ev);
|
||||
|
||||
public: // store utilties
|
||||
public: // store utilities
|
||||
|
||||
morkAtom* YarnToAtom(morkEnv* ev, const mdbYarn* inYarn, bool createIfMissing = true);
|
||||
morkAtom* AddAlias(morkEnv* ev, const morkMid& inMid,
|
||||
|
|
|
|||
|
|
@ -410,10 +410,10 @@ void morkStream::NewNullStreamBufferError(morkEnv* ev) const
|
|||
{ ev->NewError("null stream buffer"); }
|
||||
|
||||
void morkStream::NewCantReadSinkError(morkEnv* ev) const
|
||||
{ ev->NewError("cant read stream sink"); }
|
||||
{ ev->NewError("can not read stream sink"); }
|
||||
|
||||
void morkStream::NewCantWriteSourceError(morkEnv* ev) const
|
||||
{ ev->NewError("cant write stream source"); }
|
||||
{ ev->NewError("can not write stream source"); }
|
||||
|
||||
void morkStream::NewPosBeyondEofError(morkEnv* ev) const
|
||||
{ ev->NewError("stream pos beyond eof"); }
|
||||
|
|
|
|||
|
|
@ -797,7 +797,7 @@ morkTable::SetSearchSorting( // use this sorting in FindRowMatches()
|
|||
// the column which is actually sorted by ioSorting. This method
|
||||
// is most useful in conjunction with nsIMdbSorting::SetCompare(),
|
||||
// because otherwise a caller would not be able to override the
|
||||
// comparison ordering method used during searchs. Note that some
|
||||
// comparison ordering method used during searches. Note that some
|
||||
// database implementations might be unable to use an arbitrarily
|
||||
// specified sort order, either due to schema or runtime interface
|
||||
// constraints, in which case ioSorting might not actually be used.
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ public: // state is public because the entire Mork system is private
|
|||
// the column which is actually sorted by ioSorting. This method
|
||||
// is most useful in conjunction with nsIMdbSorting::SetCompare(),
|
||||
// because otherwise a caller would not be able to override the
|
||||
// comparison ordering method used during searchs. Note that some
|
||||
// comparison ordering method used during searches. Note that some
|
||||
// database implementations might be unable to use an arbitrarily
|
||||
// specified sort order, either due to schema or runtime interface
|
||||
// constraints, in which case ioSorting might not actually be used.
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
#define morkWriter_kPhaseRowSpaceRows 10 /*mWriter_RowSpaceRowsIter*/
|
||||
|
||||
#define morkWriter_kPhaseContentDone 11 /* all content written */
|
||||
#define morkWriter_kPhaseWritingDone 12 /* everthing has been done */
|
||||
#define morkWriter_kPhaseWritingDone 12 /* everything has been done */
|
||||
|
||||
#define morkWriter_kCountNumberOfPhases 13 /* part of mWrite_TotalCount */
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public: // typing & errors
|
|||
**| of accumulating too much unused, fragmented free space. This should be a
|
||||
**| small multiple of kNewHunkSize, say about two to four times as great, to
|
||||
**| allow for no more free hunk space than fits in a handful of new hunks.
|
||||
**| This strategy will let us usefuly accumulate "some" free space in the
|
||||
**| This strategy will let us usefully accumulate "some" free space in the
|
||||
**| free hunk list, but without accumulating "too much" free space that way.
|
||||
|*/
|
||||
#define morkZone_kMaxFreeVolume (morkZone_kNewHunkSize * 3)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue