dbertoni    2003/11/17 13:13:12

  Modified:    c/Tests/Errortests Errortests.cpp
               c/Tests/Harness XMLFileReporter.cpp
               c/samples/ExternalFunction ExternalFunction.cpp
               c/src/xalanc/DOMSupport XalanDocumentPrefixResolver.cpp
                        XalanNamespacesStack.cpp
               c/src/xalanc/PlatformSupport AttributeListImpl.cpp
                        AttributesImpl.cpp XalanFileOutputStream.cpp
                        XalanOutputStream.cpp
               c/src/xalanc/TestXSLT process.cpp
               c/src/xalanc/XMLSupport FormatterToXML.cpp
               c/src/xalanc/XPath FunctionID.cpp XPathProcessorImpl.cpp
               c/src/xalanc/XSLT OutputContextStack.cpp
                        ResultNamespacesStack.cpp
                        StylesheetConstructionContextDefault.cpp
                        StylesheetRoot.cpp StylesheetRoot.hpp
               c/src/xalanc/XalanDOM XalanDOMString.cpp
               c/src/xalanc/XalanEXSLT XalanEXSLTMath.cpp
               c/src/xalanc/XalanTransformer XalanTransformer.hpp
  Log:
  Replace calls to size() with calls to empty().
  
  Revision  Changes    Path
  1.17      +1 -1      xml-xalan/c/Tests/Errortests/Errortests.cpp
  
  Index: Errortests.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Errortests/Errortests.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Errortests.cpp    19 Sep 2003 20:33:03 -0000      1.16
  +++ Errortests.cpp    17 Nov 2003 21:13:09 -0000      1.17
  @@ -210,7 +210,7 @@
                                const XalanDOMString&   currentDir = dirs[j];
   
                                // Run specific category of files from given 
directory
  -                             if (h.args.sub.size() == 0 || currentDir == 
h.args.sub)
  +                             if (h.args.sub.empty() == true || currentDir == 
h.args.sub)
                                {
                                        // Check that output directory is there.
                                        const XalanDOMString  theOutputDir = 
h.args.output + currentDir;
  
  
  
  1.22      +2 -2      xml-xalan/c/Tests/Harness/XMLFileReporter.cpp
  
  Index: XMLFileReporter.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Harness/XMLFileReporter.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- XMLFileReporter.cpp       19 Sep 2003 20:33:03 -0000      1.21
  +++ XMLFileReporter.cpp       17 Nov 2003 21:13:09 -0000      1.22
  @@ -130,7 +130,7 @@
        m_error(false),
        m_flushOnCaseClose(true)
   {
  -     if (m_fileName.size() > 0)
  +     if (m_fileName.empty() == false)
        {
                m_ready = initialize();
        }
  @@ -139,7 +139,7 @@
   bool
   XMLFileReporter::initialize()
   {    
  -    if (m_fileName.size() == 0)
  +    if (m_fileName.empty() == true)
       {
           // We don't have a valid file, so bail
           m_error = true;
  
  
  
  1.33      +1 -1      xml-xalan/c/samples/ExternalFunction/ExternalFunction.cpp
  
  Index: ExternalFunction.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/samples/ExternalFunction/ExternalFunction.cpp,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- ExternalFunction.cpp      20 Aug 2003 15:53:38 -0000      1.32
  +++ ExternalFunction.cpp      17 Nov 2003 21:13:09 -0000      1.33
  @@ -286,7 +286,7 @@
                        const XObjectArgVectorType&             args,
                        const LocatorType*                              
locator) const
        {
  -             if (args.size() != 0)
  +             if (args.empty() == false)
                {
                        executionContext.error(getError(), context, locator);
                }
  
  
  
  1.2       +1 -1      
xml-xalan/c/src/xalanc/DOMSupport/XalanDocumentPrefixResolver.cpp
  
  Index: XalanDocumentPrefixResolver.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/DOMSupport/XalanDocumentPrefixResolver.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanDocumentPrefixResolver.cpp   29 Jun 2003 03:57:53 -0000      1.1
  +++ XalanDocumentPrefixResolver.cpp   17 Nov 2003 21:13:09 -0000      1.2
  @@ -106,7 +106,7 @@
        else
        {
                const AttributeVectorType&      theVector = (*i).second;
  -             assert(theVector.size() > 0);
  +             assert(theVector.empty() == false);
   
                if (theVector.size() == 1)
                {
  
  
  
  1.3       +1 -1      
xml-xalan/c/src/xalanc/DOMSupport/XalanNamespacesStack.cpp
  
  Index: XalanNamespacesStack.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/DOMSupport/XalanNamespacesStack.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanNamespacesStack.cpp  19 Sep 2003 21:05:20 -0000      1.2
  +++ XalanNamespacesStack.cpp  17 Nov 2003 21:13:09 -0000      1.3
  @@ -244,7 +244,7 @@
                        XalanDOMString::size_type       theLength)
   {
        assert(theURI != 0);
  -     assert(m_createNewContextStack.size() != 0);
  +     assert(m_createNewContextStack.empty() == false);
   
        // Check to see if we need to create a new context and do so if 
necessary...
        if (m_createNewContextStack.back() == true)
  
  
  
  1.3       +1 -1      
xml-xalan/c/src/xalanc/PlatformSupport/AttributeListImpl.cpp
  
  Index: AttributeListImpl.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/AttributeListImpl.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AttributeListImpl.cpp     19 Sep 2003 21:05:21 -0000      1.2
  +++ AttributeListImpl.cpp     17 Nov 2003 21:13:10 -0000      1.3
  @@ -467,7 +467,7 @@
   
                theEntry->clear();
   
  -             assert(theEntry->m_Name.size() == 0 && theEntry->m_Value.size() 
== 0 && theEntry->m_Type.size() == 0);
  +             assert(theEntry->m_Name.empty() == true && 
theEntry->m_Value.empty() == true && theEntry->m_Type.empty() == true);
   
                theEntry->m_Name.insert(theEntry->m_Name.begin(), name, 
AttributeVectorEntry::endArray(name) + 1);
                theEntry->m_Value.insert(theEntry->m_Value.begin(), value, 
AttributeVectorEntry::endArray(value) + 1);
  
  
  
  1.4       +3 -3      xml-xalan/c/src/xalanc/PlatformSupport/AttributesImpl.cpp
  
  Index: AttributesImpl.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/AttributesImpl.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AttributesImpl.cpp        10 Oct 2003 16:47:16 -0000      1.3
  +++ AttributesImpl.cpp        17 Nov 2003 21:13:10 -0000      1.4
  @@ -536,9 +536,9 @@
   
                theEntry->clear();
   
  -             assert(theEntry->m_Name.size() == 0 && theEntry->m_Value.size() 
== 0 &&
  -                        theEntry->m_Type.size() == 0 && 
theEntry->m_uri.size() == 0 &&
  -                        theEntry->m_localName.size() == 0 );
  +             assert(theEntry->m_Name.empty() == true && 
theEntry->m_Value.empty() == true &&
  +                        theEntry->m_Type.empty() == true && 
theEntry->m_uri.empty() == true &&
  +                        theEntry->m_localName.empty() == true);
   
                theEntry->m_Name.insert(theEntry->m_Name.begin(), name, 
AttributeVectorEntry::endArray(name) + 1);
                theEntry->m_Value.insert(theEntry->m_Value.begin(), value, 
AttributeVectorEntry::endArray(value) + 1);
  
  
  
  1.5       +1 -1      
xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
  
  Index: XalanFileOutputStream.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanFileOutputStream.cpp 19 Sep 2003 21:05:22 -0000      1.4
  +++ XalanFileOutputStream.cpp 17 Nov 2003 21:13:10 -0000      1.5
  @@ -124,7 +124,7 @@
   #else
        const CharVectorType    
theResult(TranscodeToLocalCodePage(theFileName));
   
  -     if (theResult.size() == 0)
  +     if (theResult.empty() == true)
        {
                return 0;
        }
  
  
  
  1.2       +1 -1      
xml-xalan/c/src/xalanc/PlatformSupport/XalanOutputStream.cpp
  
  Index: XalanOutputStream.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanOutputStream.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XalanOutputStream.cpp     29 Jun 2003 03:57:55 -0000      1.1
  +++ XalanOutputStream.cpp     17 Nov 2003 21:13:10 -0000      1.2
  @@ -146,7 +146,7 @@
   
        if (theBufferLength > m_bufferSize)
        {
  -             assert(m_buffer.size() == 0);
  +             assert(m_buffer.empty() == true);
   
                doWrite(theBuffer, theBufferLength);
        }
  
  
  
  1.5       +1 -1      xml-xalan/c/src/xalanc/TestXSLT/process.cpp
  
  Index: process.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/TestXSLT/process.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- process.cpp       19 Sep 2003 21:05:25 -0000      1.4
  +++ process.cpp       17 Nov 2003 21:13:10 -0000      1.5
  @@ -915,7 +915,7 @@
         */
        processor.setQuietConflictWarnings(params.setQuietConflictWarnings);
   
  -     if (params.params.size() > 0)
  +     if (params.params.empty() == false)
        {
                StringPairVectorType::const_iterator    it = 
params.params.begin();
   
  
  
  
  1.4       +2 -2      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML.cpp
  
  Index: FormatterToXML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FormatterToXML.cpp        18 Sep 2003 23:55:23 -0000      1.3
  +++ FormatterToXML.cpp        17 Nov 2003 21:13:10 -0000      1.4
  @@ -890,7 +890,7 @@
   void
   FormatterToXML::flushChars()
   {
  -     assert(m_charBuf.size() > 0 && m_charBuf.size() >= m_pos);
  +     assert(m_charBuf.empty() == false && m_charBuf.size() >= m_pos);
   
        m_writer->write(&m_charBuf[0], 0, m_pos);
   
  @@ -902,7 +902,7 @@
   void
   FormatterToXML::flushBytes()
   {
  -     assert(m_byteBuf.size() > 0 && m_byteBuf.size() >= m_pos);
  +     assert(m_byteBuf.empty() == false && m_byteBuf.size() >= m_pos);
   
        m_writer->write(&m_byteBuf[0], 0, m_pos);
   
  
  
  
  1.4       +1 -1      xml-xalan/c/src/xalanc/XPath/FunctionID.cpp
  
  Index: FunctionID.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/FunctionID.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FunctionID.cpp    26 Oct 2003 00:41:04 -0000      1.3
  +++ FunctionID.cpp    17 Nov 2003 21:13:11 -0000      1.4
  @@ -113,7 +113,7 @@
                                                                        
context->getOwnerDocument();
        assert(theDocContext != 0);
   
  -     if (theResultString.size() == 0)
  +     if (theResultString.empty() == true)
        {
                return executionContext.getXObjectFactory().createNodeSet(0);
        }
  
  
  
  1.2       +2 -2      xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.cpp
  
  Index: XPathProcessorImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathProcessorImpl.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XPathProcessorImpl.cpp    29 Jun 2003 03:58:00 -0000      1.1
  +++ XPathProcessorImpl.cpp    17 Nov 2003 21:13:11 -0000      1.2
  @@ -494,13 +494,13 @@
   {
        assert(m_xpath != 0);
        assert(m_expression != 0);
  -     assert(m_token.size() > 0);
  +     assert(m_token.empty() == false);
   
        StringToStringMapType::const_iterator   i = m_namespaces.find(m_token);
        assert(i != m_namespaces.end());
   
        const XalanDOMString* const             theNamespaceURI = (*i).second;
  -     assert(theNamespaceURI != 0 && theNamespaceURI->size() != 0);
  +     assert(theNamespaceURI != 0 && theNamespaceURI->empty() == false);
   
        m_expression->replaceRelativeToken(
                        -1,
  
  
  
  1.3       +1 -1      xml-xalan/c/src/xalanc/XSLT/OutputContextStack.cpp
  
  Index: OutputContextStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/OutputContextStack.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OutputContextStack.cpp    19 Sep 2003 20:33:04 -0000      1.2
  +++ OutputContextStack.cpp    17 Nov 2003 21:13:11 -0000      1.3
  @@ -145,7 +145,7 @@
                popContext();
        }
   
  -     assert(size() == 0);
  +     assert(empty() == true);
   }
   
   
  
  
  
  1.3       +1 -1      xml-xalan/c/src/xalanc/XSLT/ResultNamespacesStack.cpp
  
  Index: ResultNamespacesStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ResultNamespacesStack.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResultNamespacesStack.cpp 19 Sep 2003 20:33:04 -0000      1.2
  +++ ResultNamespacesStack.cpp 17 Nov 2003 21:13:11 -0000      1.3
  @@ -91,7 +91,7 @@
                        XalanDOMString::size_type       theLength)
   {
        assert(theNamespaceURI != 0);
  -     assert(m_createNewContextStack.size() != 0);
  +     assert(m_createNewContextStack.empty() == false);
   
        // Check to see if we need to create a new context and do so if 
necessary...
        if (m_createNewContextStack.back() == true)
  
  
  
  1.4       +1 -1      
xml-xalan/c/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp
  
  Index: StylesheetConstructionContextDefault.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetConstructionContextDefault.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StylesheetConstructionContextDefault.cpp  19 Sep 2003 20:33:04 -0000      
1.3
  +++ StylesheetConstructionContextDefault.cpp  17 Nov 2003 21:13:11 -0000      
1.4
  @@ -436,7 +436,7 @@
                delete theStylesheetRoot;
        }
   
  -     if (m_stylesheets.size() == 0)
  +     if (m_stylesheets.empty() == true)
        {
                reset();
        }
  
  
  
  1.9       +1 -1      xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.cpp
  
  Index: StylesheetRoot.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.cpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- StylesheetRoot.cpp        1 Oct 2003 21:15:36 -0000       1.8
  +++ StylesheetRoot.cpp        17 Nov 2003 21:13:11 -0000      1.9
  @@ -206,7 +206,7 @@
        {
                m_cdataSectionElems.clear();
        }
  -     else if (m_cdataSectionElems.size() > 0)
  +     else if (m_cdataSectionElems.empty() == false)
        {
                XALAN_USING_STD(sort)
   
  
  
  
  1.4       +2 -2      xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.hpp
  
  Index: StylesheetRoot.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/StylesheetRoot.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StylesheetRoot.hpp        1 Oct 2003 21:15:36 -0000       1.3
  +++ StylesheetRoot.hpp        17 Nov 2003 21:13:11 -0000      1.4
  @@ -368,8 +368,8 @@
        bool
        hasCDATASectionElements() const
        {
  -             assert(m_hasCDATASectionElems == false && 
m_cdataSectionElems.size() == 0 ||
  -                        m_hasCDATASectionElems == true && 
m_cdataSectionElems.size() != 0);
  +             assert(m_hasCDATASectionElems == false && 
m_cdataSectionElems.empty() == true ||
  +                        m_hasCDATASectionElems == true && 
m_cdataSectionElems.empty() == false);
   
                return m_hasCDATASectionElems;
        }
  
  
  
  1.4       +1 -1      xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp
  
  Index: XalanDOMString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XalanDOMString.cpp        19 Sep 2003 21:05:32 -0000      1.3
  +++ XalanDOMString.cpp        17 Nov 2003 21:13:11 -0000      1.4
  @@ -402,7 +402,7 @@
   
        if (theLength != 0)
        {
  -             if (size() == 0)
  +             if (empty() == true)
                {
                        doTranscode(theString, theLength, m_data, true);
                }
  
  
  
  1.4       +1 -1      xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp
  
  Index: XalanEXSLTMath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTMath.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XalanEXSLTMath.cpp        23 Oct 2003 23:13:55 -0000      1.3
  +++ XalanEXSLTMath.cpp        17 Nov 2003 21:13:12 -0000      1.4
  @@ -348,7 +348,7 @@
                        const XObjectArgVectorType&             args,
                        const LocatorType*                              
locator) const
   {
  -     if (args.size() != 0)
  +     if (args.empty() == false)
        {
                executionContext.error(getError(), context, locator);
        }
  
  
  
  1.5       +3 -3      
xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.hpp
  
  Index: XalanTransformer.hpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanTransformer.hpp      10 Oct 2003 18:19:51 -0000      1.4
  +++ XalanTransformer.hpp      17 Nov 2003 21:13:12 -0000      1.5
  @@ -631,7 +631,7 @@
        const XalanDOMChar*
        getExternalSchemaLocation() const
        {
  -             return m_externalSchemaLocation.size() == 0 ? 0 : 
m_externalSchemaLocation.c_str();
  +             return m_externalSchemaLocation.empty() == true ? 0 : 
m_externalSchemaLocation.c_str();
        }
   
        /**
  @@ -657,7 +657,7 @@
        const XalanDOMChar*
        getExternalNoNamespaceSchemaLocation() const
        {
  -             return m_externalNoNamespaceSchemaLocation.size() == 0 ? 0 : 
m_externalNoNamespaceSchemaLocation.c_str();
  +             return m_externalNoNamespaceSchemaLocation.empty() == true ? 0 
: m_externalNoNamespaceSchemaLocation.c_str();
        }
   
        /**
  @@ -705,7 +705,7 @@
        const char*
        getLastError() const
        {
  -             assert(m_errorMessage.size() > 0);
  +             assert(m_errorMessage.empty() == false);
   
                return &m_errorMessage[0]; 
        }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to