[DEV] better init of vec 2/3

This commit is contained in:
2013-03-01 09:14:53 +01:00
parent c767266dfe
commit ed462a3b36
4 changed files with 24 additions and 19 deletions

View File

@@ -114,9 +114,7 @@ bool BufferText::NeedToUpdateDisplayPosition(void)
vec2 BufferText::GetBorderSize(void)
{
vec2 tmpVal;
tmpVal.setValue(30,30);
return tmpVal;
return vec2(30,30);;
}
@@ -864,7 +862,7 @@ vec2 BufferText::GetPosition(int32_t fontId, bool& centerRequested)
{
centerRequested = m_centerRequested;
m_centerRequested = false;
vec2 outputPosition;
vec2 outputPosition(0,0);
// Display position (Y mode):
APPL_INFO("change the position : " << m_cursorPos);
@@ -892,7 +890,7 @@ vec2 BufferText::GetPosition(int32_t fontId, bool& centerRequested)
/* if we request a center :
} else {
// center the line at the middle of the screen :
vec2 outputPosition;
vec2 outputPosition(0,0);
//APPL_DEBUG(" -------------------------------------------------");
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
//APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y);

View File

@@ -84,8 +84,7 @@ CodeView::~CodeView(void)
*/
void CodeView::UpdateNumberOfLineReference(int32_t bufferID)
{
vec2 tmpCoord;
tmpCoord.setValue(0,0);
vec2 tmpCoord(0,0);
if (m_lineNumberList.Size()<=bufferID) {
// update the number of elements :
for (int32_t iii=m_lineNumberList.Size(); iii <= bufferID; iii++) {

View File

@@ -49,22 +49,22 @@ int main(int argc, const char *argv[])
void APP_Init(void)
{
#ifdef MODE_RELEASE
char * debugMode = "Release";
const char * debugMode = "Release";
#else
char * debugMode = "Debug";
const char * debugMode = "Debug";
#endif
#ifdef __TARGET_OS__Linux
char * osMode = "Linux";
const char * osMode = "Linux";
#elif defined(__TARGET_OS__Android)
char * osMode = "Android";
const char * osMode = "Android";
#elif defined(__TARGET_OS__Windows)
char * osMode = "Windows";
const char * osMode = "Windows";
#elif defined(__TARGET_OS__IOs)
char * osMode = "IOs";
const char * osMode = "IOs";
#elif defined(__TARGET_OS__MacOs)
char * osMode = "MacOs";
const char * osMode = "MacOs";
#else
char * osMode = "Unknown";
const char * osMode = "Unknown";
#endif
APPL_INFO("==> Init "PROJECT_NAME" (START) [" << osMode << "] (" << debugMode << ")");