Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6739535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:30:02+00:00 2026-05-26T11:30:02+00:00

I have the following code: void CScriptTable::EnumReferences(asIScriptEngine *engine) { if (m_table) { // Call

  • 0

I have the following code:

void CScriptTable::EnumReferences(asIScriptEngine *engine)
{
    if (m_table)
    {   
        // Call the gc enum callback for each nested table      
        size_t col = 0, row = 0, num_cols = m_table->numCols(), num_rows = m_table->numRows();

        for( col; col < num_cols; col++ )   // Line 92
        {   
            if (m_table->getColType(col) == COL_TABLE) {
                for (row; row < num_rows; row++){  // Line 95
                    Table * tbl = m_table->getTable(row, col);
                    engine->GCEnumCallback(tbl);
                }   
            }   
        }   
    }   
}

When compiling, (g++), the warning (statement has no effect) is issued for line 92 & 95 (indicated in the snippet above)

I can’t see why they have no effect even though I have been staring at it for a while – could do with a second pair of eyes to see if they can spot what I’m missing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:30:02+00:00Added an answer on May 26, 2026 at 11:30 am

    If guess you want to iterate over all columns and for each of them over all rows. so better change your code to something like this:

    The first statement in the for loop is executed once, i.e. at the time the loop is entered at first. Since you want to include row number zero for all further columns you have to set row to 0 for each column:

    void CScriptTable::EnumReferences(asIScriptEngine *engine)
    {
        if (m_table)
        {   
            // Call the gc enum callback for each nested table      
            size_t num_cols = m_table->numCols(), num_rows = m_table->numRows();
    
            for(size_t col = 0; col < num_cols; col++ )   // Line 92
            {   
                if (m_table->getColType(col) == COL_TABLE) {
                    for (size_t row = 0; row < num_rows; row++){  // Line 95
                        Table * tbl = m_table->getTable(row, col);
                        engine->GCEnumCallback(tbl);
                    }   
                }   
            }   
        }   
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code: private void ProcessQueue() { foreach (MessageQueueItem item in GetNextQueuedItem()) PerformAction(item);
I have the following code: void foo() { vector<double> v(100,1); // line 1 //
I have following code: public static void ProcessStep(Action action) { //do something here if
I have the following code: public void BeginConvert(object data) { ConverterData cObject = (ConverterData)data;
I have the following code: public void post(String message) { final String mess =
I have following code public class TEST { public static void main(String arg[]){ try
I have the following code: private static void WriteStartupInfo() { Settings settings = Settings.Default;
i have the following code: public static void Serialize() { List<string> dirs = FileHelper.GetFilesRecursive(fileDirectoryPath);
I have the following code: public virtual void Initialise() { this.AddHeader(SystemContext, this.UserSettings.SystemContext); } public
I have the following code: [TestMethod] public void TestFoo() { Foo(null); } private void

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.