Changeset 2257 for trunk/src/sys


Ignore:
Timestamp:
Jan 22, 2013, 1:48:51 AM (7 years ago)
Author:
sam
Message:

core: move the Log and Timer classes to the sys/ subdirectory, use
the String class instead of the stack for logging, and get rid of
the old and useless BitField class.

Location:
trunk/src/sys
Files:
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/sys/log.cpp

    r2256 r2257  
    8383    };
    8484
    85     char buf[4096];
    86     vsnprintf(buf, 4095, fmt, ap);
    87     buf[4095] = '\0';
    88 
    89     __android_log_print(prio[type], "LOL", "[%d] %s", (int)gettid(), buf);
     85    String buf = String::Printf(fmt, ap);
     86    __android_log_print(prio[type], "LOL", "[%d] %s", (int)gettid(), &buf[0]);
    9087
    9188#else
     
    9996
    10097#   if defined _WIN32
    101     char buf[4096];
    102     vsnprintf(buf, 4095, fmt, ap);
    103     buf[4095] = '\0';
    104     OutputDebugString(prefix[type]);
    105     OutputDebugString(": ");
    106     OutputDebugString(buf);
     98    String buf = String(prefix[type]) + ": " + String::Printf(fmt, ap);
     99    OutputDebugString(&buf[0]);
    107100#   else
    108101    fprintf(stderr, "%s: ", prefix[type]);
Note: See TracChangeset for help on using the changeset viewer.