lNewPos = m_nFileSize + lOff;
}
else{
- return ( position_type ) - 1;
+ return -1;
}
m_nPosition = lNewPos;
ID_INLINE mat3_t::mat3_t() {
}
-ID_INLINE mat3_t::mat3_t( float src[ 3 ][ 3 ] ) {
- memcpy( mat, src, sizeof( src ) );
+ID_INLINE mat3_t::mat3_t(float src[3][3]) {
+ memcpy(mat, src, sizeof(float) * 3 * 3);
}
ID_INLINE mat3_t::mat3_t( idVec3 const &x, idVec3 const &y, idVec3 const &z ) {
StringOutputStream(){
}
-StringOutputStream( std::size_t capacity ) : m_string( capacity ){
+explicit StringOutputStream( std::size_t capacity ) : m_string( capacity ){
}
std::size_t write( const char* buffer, std::size_t length ){
m_string.push_range( buffer, buffer + length );
returns a vector containing the tags
*/
- char* expression;
+ char const *expression;
if ( shader == NULL ) { // get all tags from all shaders
expression = "/root/*/*/tag";
returns a set containing the shaders (with path)
*/
- char* expression = "/root/*/*[not(child::tag)]";
+ char const *expression = "/root/*/*[not(child::tag)]";
xmlXPathObjectPtr xpathPtr = XpathEval( expression );
xmlNodeSetPtr nodePtr;
returns a set containing all used tags
*/
- char* expression = "/root/*/*/tag";
+ char const *expression = "/root/*/*/tag";
xmlXPathObjectPtr xpathPtr = XpathEval( expression );
xmlNodeSetPtr nodePtr;
#include "cmdlib.h"
int g_argc;
-char** g_argv;
+char const** g_argv;
-void args_init( int argc, char* argv[] ){
+void args_init( int argc, char const* argv[] ){
int i, j, k;
for ( i = 1; i < argc; i++ )
g_argv = argv;
}
-char *gamedetect_argv_buffer[1024];
-void gamedetect_found_game( char *game, char *path ){
+char const *gamedetect_argv_buffer[1024];
+void gamedetect_found_game( char const *game, char *path ){
int argc;
static char buf[128];
g_argv = gamedetect_argv_buffer;
}
-bool gamedetect_check_game( char *gamefile, const char *checkfile1, const char *checkfile2, char *buf /* must have 64 bytes free after bufpos */, int bufpos ){
+bool gamedetect_check_game( char const *gamefile, const char *checkfile1, const char *checkfile2, char *buf /* must have 64 bytes free after bufpos */, int bufpos ){
buf[bufpos] = '/';
strcpy( buf + bufpos + 1, checkfile1 );
;
/// brief Returns the filename of the executable belonging to the current process, or 0 if not found.
-char* getexename( char *buf ){
+char const* getexename( char *buf ){
/* Now read the symbolic link */
int ret = readlink( LINK_NAME, buf, PATH_MAX );
return buf;
}
-void environment_init( int argc, char* argv[] ){
+void environment_init( int argc, char const* argv[] ){
// Give away unnecessary root privileges.
// Important: must be done before calling gtk_init().
char *loginname;
#if !defined( INCLUDED_ENVIRONMENT_H )
#define INCLUDED_ENVIRONMENT_H
-void environment_init( int argc, char* argv[] );
+void environment_init( int argc, char const* argv[] );
const char* environment_get_home_path();
const char* environment_get_app_path();
extern int g_argc;
-extern char** g_argv;
+extern char const** g_argv;
#endif
GlobalDebugMessageHandler::instance().setHandler( GlobalPopupDebugMessageHandler::instance() );
- environment_init( argc, argv );
+ environment_init(argc, (char const **) argv);
paths_init();
name << GlobalRadiant().getAppPath() << "bitmaps/" NOTEX_BASENAME ".png";
g_notex = name.c_str();
- name = NULL;
+ name = StringOutputStream(256);
name << GlobalRadiant().getAppPath() << "bitmaps/" SHADERNOTEX_BASENAME " .png";
g_shadernotex = name.c_str();
}