parent
1de6ecb238
commit
7f97aa2d5d
|
|
@ -916,7 +916,6 @@ namespace LLInitParam
|
|||
{
|
||||
predicate.add(NON_DEFAULT);
|
||||
}
|
||||
predicate.unknown(REQUIRED);
|
||||
if (typed_param.isValid())
|
||||
{
|
||||
predicate.add(VALID);
|
||||
|
|
@ -1074,8 +1073,6 @@ namespace LLInitParam
|
|||
const self_t& typed_param = static_cast<const self_t&>(param);
|
||||
|
||||
LLPredicate::Value<ESerializePredicates> predicate;
|
||||
predicate.unknown(NON_DEFAULT);
|
||||
predicate.unknown(REQUIRED);
|
||||
|
||||
if (typed_param.isValid())
|
||||
{
|
||||
|
|
@ -1272,16 +1269,11 @@ namespace LLInitParam
|
|||
const self_t& typed_param = static_cast<const self_t&>(param);
|
||||
|
||||
LLPredicate::Value<ESerializePredicates> predicate;
|
||||
predicate.unknown(NON_DEFAULT);
|
||||
|
||||
if (typed_param.mMinCount > 0)
|
||||
{
|
||||
predicate.add(REQUIRED);
|
||||
}
|
||||
else
|
||||
{
|
||||
predicate.unknown(REQUIRED);
|
||||
}
|
||||
|
||||
if (typed_param.isValid())
|
||||
{
|
||||
|
|
@ -1538,16 +1530,11 @@ namespace LLInitParam
|
|||
const self_t& typed_param = static_cast<const self_t&>(param);
|
||||
|
||||
LLPredicate::Value<ESerializePredicates> predicate;
|
||||
predicate.unknown(NON_DEFAULT);
|
||||
|
||||
if (typed_param.mMinCount > 0)
|
||||
{
|
||||
predicate.add(REQUIRED);
|
||||
}
|
||||
else
|
||||
{
|
||||
predicate.unknown(REQUIRED);
|
||||
}
|
||||
|
||||
if (typed_param.isValid())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -880,16 +880,24 @@ LLXMLNodePtr LLXUIParser::getNode(name_stack_t& stack)
|
|||
it = next_it)
|
||||
{
|
||||
++next_it;
|
||||
bool force_new_node = false;
|
||||
|
||||
if (it->first.empty())
|
||||
{
|
||||
it->second = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (next_it != stack.end() && next_it->first.empty() && next_it->second)
|
||||
{
|
||||
force_new_node = true;
|
||||
}
|
||||
|
||||
|
||||
out_nodes_t::iterator found_it = mOutNodes.find(it->first);
|
||||
|
||||
// node with this name not yet written
|
||||
if (found_it == mOutNodes.end() || it->second)
|
||||
if (found_it == mOutNodes.end() || it->second || force_new_node)
|
||||
{
|
||||
// make an attribute if we are the last element on the name stack
|
||||
bool is_attribute = next_it == stack.end();
|
||||
|
|
|
|||
|
|
@ -273,7 +273,8 @@ void LLXMLNode::addChild(LLXMLNodePtr new_child, LLXMLNodePtr after_child)
|
|||
new_child->mParent = this;
|
||||
if (new_child->mIsAttribute)
|
||||
{
|
||||
mAttributes.insert(std::make_pair(new_child->mName, new_child));
|
||||
std::pair<LLXMLAttribList::iterator, bool> result = mAttributes.insert(std::make_pair(new_child->mName, new_child));
|
||||
llassert(result.second);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue