[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kttt/src
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2003-11-17 23:07:12
[Download RAW message or body]
CVS commit by aacid:
use new instead calloc
M +4 -6 board.cpp 1.10
--- kdenonbeta/kttt/src/board.cpp #1.9:1.10
@@ -13,14 +13,12 @@
#include <kglobal.h> // for Q_ASSERT
-#include <stdlib.h> // for calloc
-
#include "board.h"
board::board(bool createKcases)
{
- cases = static_cast<kcase***>(calloc(3, sizeof(kcase**)));
+ cases = new (kcase**)[3];
for (int i = 0; i < 3; i++)
{
- cases[i] = static_cast<kcase**>(calloc(3, sizeof(kcase*)));
+ cases[i] = new (kcase*)[3];
for (int j = 0; j < 3; j++)
{
@@ -42,8 +40,8 @@ board::board(const board *original)
selected_y = original -> selected_y;
- cases = static_cast<kcase***>(calloc(3, sizeof(kcase**)));
+ cases = new (kcase**)[3];
for (int i = 0; i < 3; i++)
{
- cases[i] = static_cast<kcase**>(calloc(3, sizeof(kcase*)));
+ cases[i] = new (kcase*)[3];
for (int j = 0; j < 3; j++)
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic