diff --git a/indra/llcommon/StackWalker.cpp b/indra/llcommon/StackWalker.cpp index 35604f2492844822bc7a34affb76d0020a4229aa..3611dea1f62028baf7c2ddc84f6a35243e28bb50 100644 --- a/indra/llcommon/StackWalker.cpp +++ b/indra/llcommon/StackWalker.cpp @@ -87,8 +87,8 @@ #include <windows.h> #include <tchar.h> -#include <stdio.h> -#include <stdlib.h> +#include <cstdio> +#include <cstdlib> #pragma comment(lib, "version.lib") // for "VerQueryValue" #include "StackWalker.h" @@ -1361,9 +1361,9 @@ void StackWalker::OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUser } } #else -#if LL_WINDOWS -#pragma warning (push) -#pragma warning (disable : 4996) // supress deprecated +#if LL_WINDOWS +#pragma warning (push) +#pragma warning (disable : 4996) // supress deprecated #endif OSVERSIONINFOEXA ver; ZeroMemory(&ver, sizeof(OSVERSIONINFOEXA)); @@ -1378,8 +1378,8 @@ void StackWalker::OnSymInit(LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUser OnOutput(buffer); } } -#if LL_WINDOWS -#pragma warning (pop) +#if LL_WINDOWS +#pragma warning (pop) #endif #endif } diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h index 17fdd25bb3430b6e3f29320d56caf8659aa4ee3c..a2a119a7070718999466d43cbd103ceb3927f017 100644 --- a/indra/llcommon/linden_common.h +++ b/indra/llcommon/linden_common.h @@ -34,7 +34,7 @@ #if defined(LL_WINDOWS) && defined(_DEBUG) # define _CRTDBG_MAP_ALLOC -# include <stdlib.h> +# include <cstdlib> # include <crtdbg.h> #endif diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index bc3d9099041d46ce5755631678ebf2ce5efe243e..a22285ec0cdd7c0db05b2c17303e0b36948e4f8d 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -57,7 +57,7 @@ LONG WINAPI default_windows_exception_handler(struct _EXCEPTION_POINTERS *exception_infop); BOOL ConsoleCtrlHandler(DWORD fdwCtrlType); #else -# include <signal.h> +# include <csignal> # include <unistd.h> // for fork() void setup_signals(); void default_unix_signal_handler(int signum, siginfo_t *info, void *); diff --git a/indra/llcommon/llapp.h b/indra/llcommon/llapp.h index 74c40ff1955b330b38448cd96b57838a09f7b754..3d2d464e858b603dc46cfc7ba1eab201bb72eed3 100644 --- a/indra/llcommon/llapp.h +++ b/indra/llcommon/llapp.h @@ -34,7 +34,7 @@ #include <atomic> #if LL_LINUX || LL_DARWIN -#include <signal.h> +#include <csignal> #endif class LLErrorThread; diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index e361672caf6275be1d61b5e55568903364453afa..6a3cb744faa49233513d0253ed63c16f0c4fab93 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -29,8 +29,8 @@ #include "linden_common.h" #include "lldate.h" -#include <time.h> -#include <locale.h> +#include <ctime> +#include <clocale> #include <string> #include <iomanip> #include <iostream> diff --git a/indra/llcommon/llfile.cpp b/indra/llcommon/llfile.cpp index a5bb80e2e7de306fa3ead04354c621ec14e8adf6..269ead229ac1bc38678dce873b20a2ac1f75dfcb 100644 --- a/indra/llcommon/llfile.cpp +++ b/indra/llcommon/llfile.cpp @@ -29,10 +29,10 @@ #if LL_WINDOWS #include "llwin32headerslean.h" -#include <stdlib.h> // Windows errno +#include <cstdlib> // Windows errno #include <vector> #else -#include <errno.h> +#include <cerrno> #include <sys/file.h> #endif diff --git a/indra/llcommon/llfindlocale.cpp b/indra/llcommon/llfindlocale.cpp index 3be3d4a0c0e611a83e91c187f642e2cf26fc0084..fc44ea73ee86d5126c90c36afa53bdfd715250ad 100644 --- a/indra/llcommon/llfindlocale.cpp +++ b/indra/llcommon/llfindlocale.cpp @@ -28,9 +28,9 @@ #include "linden_common.h" -#include <stdlib.h> -#include <string.h> -#include <ctype.h> +#include <cstdlib> +#include <cstring> +#include <cctype> #ifdef WIN32 #include "llwin32headers.h" @@ -188,7 +188,7 @@ canonise_fl(FL_Locale *l) { #ifdef WIN32 -#include <stdio.h> +#include <cstdio> #define ML(pn,sn) MAKELANGID(LANG_##pn, SUBLANG_##pn##_##sn) #define MLN(pn) MAKELANGID(LANG_##pn, SUBLANG_DEFAULT) #define RML(pn,sn) MAKELANGID(LANG_##pn, SUBLANG_##sn) diff --git a/indra/llcommon/llheartbeat.cpp b/indra/llcommon/llheartbeat.cpp index 19b7452748d930fdcad31318cc2473ff234f2b69..68bb49548d9e9d0ade9e0ebed057d6a26a0626bc 100644 --- a/indra/llcommon/llheartbeat.cpp +++ b/indra/llcommon/llheartbeat.cpp @@ -24,8 +24,8 @@ * $/LicenseInfo$ */ -#include <errno.h> -#include <signal.h> +#include <cerrno> +#include <csignal> #include "linden_common.h" #include "llapp.h" diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 8fe553c9b7b3641fb63e1ed102569aa843fcaf6c..53147a3838fcb1f0771a6f9131fd9f6b1218abda 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -30,7 +30,7 @@ #include "llunits.h" #include "stdtypes.h" #if !LL_WINDOWS -#include <stdint.h> +#include <cstdint> #endif class LLMutex ; diff --git a/indra/llcommon/llprocess.cpp b/indra/llcommon/llprocess.cpp index 4702b5d931bdf7be76487ae51552003ba99911e9..1549e2fb7703fe628934f446a57cbbe5151791ad 100644 --- a/indra/llcommon/llprocess.cpp +++ b/indra/llcommon/llprocess.cpp @@ -1210,9 +1210,9 @@ static std::string WindowsErrorString(const std::string& operation) *****************************************************************************/ #else // Mac and linux -#include <signal.h> +#include <csignal> #include <fcntl.h> -#include <errno.h> +#include <cerrno> #include <sys/wait.h> void LLProcess::autokill() diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 01b1d4e94915ee1a10f5bf580d1bdc5c42ce0549..702c43f29c473bc4739e2053fe3bc229cac97cb6 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -40,11 +40,11 @@ #include "llformat.h" #if LL_LINUX -#include <wctype.h> -#include <wchar.h> +#include <cwctype> +#include <cwchar> #endif -#include <string.h> +#include <cstring> #include <boost/scoped_ptr.hpp> const char LL_UNKNOWN_CHAR = '?'; diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index e597d7c958eec6e6514da746e2df0fe8f7e170a1..913b48afb22cdce4853b17d773c421aadadfe607 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -54,10 +54,10 @@ using namespace llsd; # include <VersionHelpers.h> #elif LL_DARWIN # include "llsys_objc.h" -# include <errno.h> +# include <cerrno> # include <sys/sysctl.h> # include <sys/utsname.h> -# include <stdint.h> +# include <cstdint> # include <CoreServices/CoreServices.h> # include <stdexcept> # include <mach/host_info.h> @@ -65,7 +65,7 @@ using namespace llsd; # include <mach/task.h> # include <mach/task_info.h> #elif LL_LINUX -# include <errno.h> +# include <cerrno> # include <sys/utsname.h> # include <unistd.h> # include <sys/sysinfo.h> @@ -201,9 +201,9 @@ LLOSInfo::LLOSInfo() : mOSStringSimple += "32-bit "; } -#if LL_WINDOWS -#pragma warning (push) -#pragma warning (disable : 4996) // compiler thinks might use uninitialized var, but no +#if LL_WINDOWS +#pragma warning (push) +#pragma warning (disable : 4996) // compiler thinks might use uninitialized var, but no #endif OSVERSIONINFOEX osvi; BOOL bOsVersionInfoEx; @@ -216,8 +216,8 @@ LLOSInfo::LLOSInfo() : osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); bOsVersionInfoEx = GetVersionEx((OSVERSIONINFO *) &osvi); } -#if LL_WINDOWS -#pragma warning (pop) +#if LL_WINDOWS +#pragma warning (pop) #endif std::string tmpstr; diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 2103d0a43e1928be4ebd78682e4353687a88c211..d40eaa2150e0ffedfe643686347df341bce5ab1c 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -31,7 +31,7 @@ #if LL_WINDOWS # include "llwin32headerslean.h" #elif LL_LINUX || LL_DARWIN -# include <errno.h> +# include <cerrno> # include <sys/time.h> #else # error "architecture not supported" diff --git a/indra/llcommon/lltimer.h b/indra/llcommon/lltimer.h index 010f290b24780db7f3fabe7ef5af00b644698fe1..f3e39dca0ce2e7ce1b062f529428e200a150c3a1 100644 --- a/indra/llcommon/lltimer.h +++ b/indra/llcommon/lltimer.h @@ -30,7 +30,7 @@ #if LL_LINUX || LL_DARWIN #include <sys/time.h> #endif -#include <limits.h> +#include <climits> #include "stdtypes.h" diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp index dce597cef853d255850e95177dc84dde4bc986f1..862157ef4dd9056caf1f9e0643a91a6c2ac725aa 100644 --- a/indra/llcommon/lluuid.cpp +++ b/indra/llcommon/lluuid.cpp @@ -613,7 +613,7 @@ S32 LLUUID::getNodeID(unsigned char *node_id) */ #include <unistd.h> #include <fcntl.h> -#include <errno.h> +#include <cerrno> #include <sys/types.h> #include <sys/time.h> #include <sys/stat.h> diff --git a/indra/llcrashlogger/llcrashlock.cpp b/indra/llcrashlogger/llcrashlock.cpp index a86e809aabe3be1b36bf87fdf94ca230054c53b7..a4764b8067c5654d5337a737318cb199758f0dcf 100644 --- a/indra/llcrashlogger/llcrashlock.cpp +++ b/indra/llcrashlogger/llcrashlock.cpp @@ -38,7 +38,7 @@ #include <boost/filesystem.hpp> #include <string> #include <iostream> -#include <stdio.h> +#include <cstdio> #if LL_WINDOWS //For windows platform. diff --git a/indra/llcrashlogger/llcrashlock.h b/indra/llcrashlogger/llcrashlock.h index 60b060b73685a338552164b637138f71d5fa5ca6..0edc99f0b7640ea8ef441381832ad7c594146260 100644 --- a/indra/llcrashlogger/llcrashlock.h +++ b/indra/llcrashlogger/llcrashlock.h @@ -32,7 +32,7 @@ class LLSD; #if !LL_WINDOWS //For non-windows platforms. -#include <signal.h> +#include <csignal> #endif //Crash reporter will now be kicked off by the viewer but otherwise diff --git a/indra/llinventory/lllandmark.cpp b/indra/llinventory/lllandmark.cpp index 2e68f902c4f51714e1e7fcd75cd1dab47a25219e..194e5ab02f7c7f33ebb0d7b10808e9902b6bb812 100644 --- a/indra/llinventory/lllandmark.cpp +++ b/indra/llinventory/lllandmark.cpp @@ -27,7 +27,7 @@ #include "linden_common.h" #include "lllandmark.h" -#include <errno.h> +#include <cerrno> #include "message.h" #include "llregionhandle.h" diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 135d0ca7b937bd7a17f62537dc39fb02528797f3..b154799ce0da7036c9a17938e8d7664532385869 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -26,7 +26,7 @@ #ifndef LL_LLPARCEL_H #define LL_LLPARCEL_H -#include <time.h> +#include <ctime> #include <iostream> #include "lluuid.h" diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index ec0116b9d2d0d5d7f268e0d4314a0006e4b2df0f..1aab2259347d2bfcae62f71d3d4ff067cad2b006 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -36,7 +36,7 @@ #endif #if !LL_WINDOWS -#include <stdint.h> +#include <cstdint> #endif #include <immintrin.h> diff --git a/indra/llmath/llvector4a.h b/indra/llmath/llvector4a.h index 2030e733dbbc84ddc5685eb4932546ff6bacbf41..c2d19507f60817c3f2b8a6b2fee43e057fb79fa0 100644 --- a/indra/llmath/llvector4a.h +++ b/indra/llmath/llvector4a.h @@ -30,7 +30,7 @@ class LLRotation; -#include <assert.h> +#include <cassert> #include "llpreprocessor.h" #include "llmemory.h" diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index b53f187a1f1f04368fc556eef909515dfd4e7444..f257103264e0465ed3f7588780dcf8e7a31c157b 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -29,7 +29,7 @@ #include <set> #if !LL_WINDOWS -#include <stdint.h> +#include <cstdint> #endif #include "llerror.h" diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index f5e2186acab3129a3ef083f7923d091d7dcf87f9..43d46bf2427f80c4ce5977930c2fd1ef37099a1e 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -891,6 +891,8 @@ public: class VertexMapData : public LLVolumeFace::VertexData { public: + VertexMapData() : mIndex(0) { } + U16 mIndex; bool operator==(const LLVolumeFace::VertexData& rhs) const; diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h index ad8bab6ee93b2408e1911053c732535fd2dd5524..3f6139b54593b6faa4454de2f241d7e8e84954b5 100644 --- a/indra/llmath/v3color.h +++ b/indra/llmath/v3color.h @@ -33,7 +33,7 @@ class LLVector4; #include "llerror.h" #include "llmath.h" #include "llsd.h" -#include <string.h> +#include <cstring> // LLColor3 = |r g b| diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index 50f5e90b6e827d10146479c3c69e485cdd390b11..5581b3da6d3473406796e35de21230a6c6d6a3b9 100644 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -27,7 +27,7 @@ #include "linden_common.h" #if !LL_WINDOWS -#include <errno.h> +#include <cerrno> #include <unistd.h> #endif diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index a76cf313019e82015583216e6074a8ab96b4ea95..76b90859f145ae097dfdec7f856fe1970a9b15f6 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -39,7 +39,7 @@ #include <netinet/in.h> #include <arpa/inet.h> #include <fcntl.h> - #include <errno.h> + #include <cerrno> #endif // linden library includes diff --git a/indra/llplugin/llpluginsharedmemory.cpp b/indra/llplugin/llpluginsharedmemory.cpp index 9cd14eda66fe8af8cc5dc4d5ab1ca3d51345a214..c3f17d9529f0a36c42172578c98dd7a8687e6352 100644 --- a/indra/llplugin/llpluginsharedmemory.cpp +++ b/indra/llplugin/llpluginsharedmemory.cpp @@ -67,7 +67,7 @@ #elif USE_SHM_OPEN_SHARED_MEMORY #include <sys/fcntl.h> #include <sys/mman.h> - #include <errno.h> + #include <cerrno> #elif USE_WIN32_SHARED_MEMORY #include "llwin32headerslean.h" #endif // USE_APR_SHARED_MEMORY diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 198494e8f37fa6a140135bb574d9f264f7873190..75776ab693287b1be865eff3165689a4d4778792 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -45,7 +45,7 @@ #endif #if LL_DARWIN || LL_LINUX - #include <signal.h> + #include <csignal> #endif #if LL_DARWIN || LL_LINUX diff --git a/indra/llvfs/lldir.cpp b/indra/llvfs/lldir.cpp index b4483bc812c39a3d48809935eba307a0baa0b551..c43076c85ec4653b5abadbd971acfbfbee081e1e 100644 --- a/indra/llvfs/lldir.cpp +++ b/indra/llvfs/lldir.cpp @@ -29,7 +29,7 @@ #if !LL_WINDOWS #include <sys/stat.h> #include <sys/types.h> -#include <errno.h> +#include <cerrno> #else #include <direct.h> #endif diff --git a/indra/llvfs/lldir_win32.cpp b/indra/llvfs/lldir_win32.cpp index 040fae664b620e0a6e5fd96f824fba99195177bb..f08f7083fe6c78b8db8a825485bda7fbd6c010ad 100644 --- a/indra/llvfs/lldir_win32.cpp +++ b/indra/llvfs/lldir_win32.cpp @@ -37,7 +37,7 @@ #include <fstream> #include <direct.h> -#include <errno.h> +#include <cerrno> #include <sys/types.h> #include <sys/stat.h> diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index 6dbceaf1ffc55c8fe055888cb4cb8e6d7ac1ba8f..77c4b1621ec45bce4dd6839db5665c6d7e398c1f 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -47,7 +47,7 @@ extern "C" { #include <gdk/gdkx.h> #endif } -#include <locale.h> +#include <clocale> #endif // LL_GTK #endif // LL_SDL diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 6e2cc2b50732ec379896b9d0e46152c965598d49..90cf9ee67c3c182a47c853780df131c6a409f7a1 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -27,7 +27,7 @@ #include "llviewerprecompiledheaders.h" #include <sstream> -#include <time.h> +#include <ctime> #include "llfloaterland.h" diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 6e90708f13b2ceb42a15b999e86f42c899f777a3..2a385058b75711f425ed335a38843fff04c37a11 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -42,7 +42,7 @@ #include "llimagepng.h" /* time headers */ -#include <time.h> +#include <ctime> #include <ctime> /* misc headers */ diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 3f3289c3790e32d4e78489501c87270821438ff0..070eb78a33bab0a13b7de387883a9ad0fc35b431 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -29,7 +29,7 @@ // system library includes -#include <stdio.h> +#include <cstdio> #include <iostream> #include <fstream> #include <algorithm> diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 13d939c8ad52e0836435a9c09420a9c276d48e30..694c7ba4b8a3f41db25c72a5ab1bd352ba0a636e 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -28,8 +28,8 @@ #include "llvoavatar.h" -#include <stdio.h> -#include <ctype.h> +#include <cstdio> +#include <cctype> #include <sstream> #include <glm/vec3.hpp> #include <glm/mat4x4.hpp> diff --git a/indra/win_crash_logger/win_crash_logger.cpp b/indra/win_crash_logger/win_crash_logger.cpp index 58746eba02559fc9becbb21d1c620bd2ff381a17..ff58ea0ccac1238abe14c7fd3c8b415f3f14a99f 100644 --- a/indra/win_crash_logger/win_crash_logger.cpp +++ b/indra/win_crash_logger/win_crash_logger.cpp @@ -26,7 +26,7 @@ #include "linden_common.h" #include "stdafx.h" -#include <stdlib.h> +#include <cstdlib> #include "llcrashloggerwindows.h" #ifdef _UNICODE