[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11728: Minor indentation changes.
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11728: Minor indentation changes. |
Date: |
Mon, 21 Dec 2009 21:33:28 +0100 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 11728 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2009-12-21 21:33:28 +0100
message:
Minor indentation changes.
modified:
libcore/abc/AbcBlock.cpp
=== modified file 'libcore/abc/AbcBlock.cpp'
--- a/libcore/abc/AbcBlock.cpp 2009-12-17 08:38:59 +0000
+++ b/libcore/abc/AbcBlock.cpp 2009-12-17 12:59:56 +0000
@@ -47,7 +47,7 @@
case KIND_CONST:
{
// Validate the type.
- abc::Class *type;
+ abc::Class* type;
if (_typeIndex) {
log_abc("Trait type: %s",
block->_stringPool[
@@ -77,40 +77,34 @@
_value, _kind == KIND_CONST, do_static);
break;
}
+
case KIND_METHOD:
- {
script->addMethod(_globalName, _namespace, _method, false);
break;
- }
+
case KIND_GETTER:
- {
script->addGetter(_name, _namespace, _method, do_static);
break;
- }
+
case KIND_SETTER:
- {
script->addSetter(_name, _namespace, _method, do_static);
break;
- }
+
case KIND_CLASS:
- {
log_abc("Adding class %s, value %s, slot=%u",
block->_stringPool[_name], _value, _slotID);
-
script->addMemberScript(_globalName, _namespace, _slotID,
block->_classes[_classInfoIndex], do_static);
break;
- }
+
case KIND_FUNCTION:
- {
- script->addSlotFunction(_name, _namespace, _slotID, _method,
do_static);
+ script->addSlotFunction(_name, _namespace, _slotID, _method,
+ do_static);
break;
- }
+
default:
- // Not here -- validated already in read.
return false;
- break;
- } // end of switch
+ }
return true;
}
@@ -120,63 +114,63 @@
log_abc("Finalizing method trait: kind %s", _kind);
switch (_kind)
{
- case KIND_SLOT:
- case KIND_CONST:
- {
- // Validate the type.
- abc::Class *type;
- if (_typeIndex) {
- type =
block->locateClass(block->_multinamePool[_typeIndex]);
- }
- else {
- type = block->mTheObject;
- }
-
- if (!type) {
- log_error(_("ABC: Finalizing trait yielded bad type for
slot."));
- return false;
- }
-
- // The name has been validated in read.
- // TODO: Find a better way to initialize trait values.
- if (!_hasValue) {
- _value = as_value((as_object*)0); // NULL value, right ?
- }
- log_abc("Adding property=%s with value=%s slot=%u",
- block->_stringPool[_name], _value.toDebugString(), _slotID);
- pMethod->addValue(_globalName, _namespace, _slotID, type,
- _value, _kind == KIND_CONST);
- break;
- }
- case KIND_METHOD:
- {
- pMethod->addMethod(_name, _namespace, _method);
- break;
- }
- case KIND_GETTER:
- {
- pMethod->addGetter(_name, _namespace, _method);
- break;
- }
- case KIND_SETTER:
- {
- pMethod->addSetter(_name, _namespace, _method);
- break;
- }
- case KIND_CLASS:
- {
- pMethod->addMemberScript(_name, _namespace, _slotID,
- block->_classes[_classInfoIndex]);
- break;
- }
- case KIND_FUNCTION:
- {
- pMethod->addSlotFunction(_name, _namespace, _slotID, _method);
- break;
- }
- default:
- // Not here -- validated already in read.
- return false;
+ case KIND_SLOT:
+ case KIND_CONST:
+ {
+ // Validate the type.
+ abc::Class *type;
+ if (_typeIndex) {
+ type = block->locateClass(block->_multinamePool[_typeIndex]);
+ }
+ else {
+ type = block->mTheObject;
+ }
+
+ if (!type) {
+ log_error(_("ABC: Finalizing trait yielded bad type for
slot."));
+ return false;
+ }
+
+ // The name has been validated in read.
+ // TODO: Find a better way to initialize trait values.
+ if (!_hasValue) {
+ _value = as_value((as_object*)0); // NULL value, right ?
+ }
+ log_abc("Adding property=%s with value=%s slot=%u",
+ block->_stringPool[_name], _value.toDebugString(),
_slotID);
+ pMethod->addValue(_globalName, _namespace, _slotID, type,
+ _value, _kind == KIND_CONST);
+ break;
+ }
+ case KIND_METHOD:
+ {
+ pMethod->addMethod(_name, _namespace, _method);
+ break;
+ }
+ case KIND_GETTER:
+ {
+ pMethod->addGetter(_name, _namespace, _method);
+ break;
+ }
+ case KIND_SETTER:
+ {
+ pMethod->addSetter(_name, _namespace, _method);
+ break;
+ }
+ case KIND_CLASS:
+ {
+ pMethod->addMemberScript(_name, _namespace, _slotID,
+ block->_classes[_classInfoIndex]);
+ break;
+ }
+ case KIND_FUNCTION:
+ {
+ pMethod->addSlotFunction(_name, _namespace, _slotID, _method);
+ break;
+ }
+ default:
+ // Not here -- validated already in read.
+ return false;
}
return true;
}
@@ -275,16 +269,13 @@
default:
{
log_error(_("ABC: Unknown type of trait."));
- // return false;
}
- } // end of switch statement
+ }
// Ignore the metadata, but it must be read to know how to ignore it.
- if ((kind >> 4) & 0x04) // has metadata
- {
+ if ((kind >> 4) & 0x04) {
boost::uint32_t mcount = in->read_V32();
- for (unsigned int i = 0; i < mcount; ++i)
- {
+ for (size_t i = 0; i < mcount; ++i) {
in->skip_V32();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11728: Minor indentation changes.,
Benjamin Wolsey <=