commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
b1247fcb709cc0eb0a0e7c56c61dea8874524015
chrome/browser/extensions/extension_javascript_url_apitest.cc
chrome/browser/extensions/extension_javascript_url_apitest.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" #include "net/base/mock_host_resolver.h" IN_PROC_BROWSER_TEST_F(ExtensionApiTest, JavaScript...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" #include "net/base/mock_host_resolver.h" // Disabled, http://crbug.com/63589. IN_PROC_BROWSE...
Disable ExtensionApiTest.JavaScriptURLPermissions, it flakily hits an assertion.
Disable ExtensionApiTest.JavaScriptURLPermissions, it flakily hits an assertion. TBR=aa BUG=63589 TEST=browser_tests Review URL: http://codereview.chromium.org/5221001 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@66600 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C++
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
109ed832bd7b954fcd092118358afe9460a44493
rshell.cpp
rshell.cpp
#inlcude <iostream> using namespace std; int main(){ return 0; }
#include <iostream> #include <string> using namespace std; int main(int argc,char **argv){ string command; cout << argv[1]; //While loop that repeats $ and cin command while(command != "exit"){ cout << "$"; cin >> command; } return 0; }
Print $ in for loop
Print $ in for loop
C++
mit
TheBoop/rShell
aa98c1cce0c165b964618f5b790ff097aa2fe4fc
source/additional-sourcefile.cpp
source/additional-sourcefile.cpp
// This file is only compiled if the cmake option BP_USE_ADDITIONAL_SOURCEFILE is set to ON #ifndef HAS_ADDITIONAL_SOURCEFILE #error If this file is compiled, the target must have HAS_ADDITIONAL_SOURCEFILE defined #endif
// This file is only compiled if the cmake option BP_USE_ADDITIONAL_SOURCEFILE is set to ON #ifndef HAS_ADDITIONAL_SOURCEFILE #error If this file is compiled, the target must have HAS_ADDITIONAL_SOURCEFILE defined #endif
Fix no newline at end of file
Fix no newline at end of file
C++
mit
Lectem/cpp-boilerplate,Lectem/cpp-boilerplate,Lectem/cpp-boilerplate
6ac3e7af4c18b5f8f9cb309a97d08c0a672b0417
src/mediaplayer/main.cpp
src/mediaplayer/main.cpp
#include "testingplayer.h" #ifdef XINE_PLAYER #include "xineplayer.h" #endif #include "qtsingleapplication.h" #include <QDebug> #include <QtDBus> int main(int argc, char** argv) { QtSingleApplication app(argc, argv); app.setApplicationName("mediahelper"); app.setOrganizationName("Nokia"); app.setOrgan...
#include "testingplayer.h" #ifdef XINE_PLAYER #include "xineplayer.h" #endif #include "qtsingleapplication.h" #include <QDebug> #include <QtDBus> int main(int argc, char** argv) { QtSingleApplication app(argc, argv); app.setApplicationName("mediahelper"); app.setOrganizationName("Nokia"); app.setOrgan...
Print a qDebug saying what player is actually running
Print a qDebug saying what player is actually running
C++
bsd-3-clause
qtmediahub/sasquatch,qtmediahub/sasquatch,qtmediahub/sasquatch
067e48d4d57948ea5a53ca3e4f76f521fc864fe4
src/gc.cpp
src/gc.cpp
//======================================================================= // Copyright (c) 2013-2014 Baptiste Wicht. // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //=================================================================...
//======================================================================= // Copyright (c) 2013-2014 Baptiste Wicht. // Distributed under the terms of the MIT License. // (See accompanying file LICENSE or copy at // http://opensource.org/licenses/MIT) //=================================================================...
Implement GC for expenses and earnings
Implement GC for expenses and earnings
C++
mit
wichtounet/budgetwarrior,wichtounet/budgetwarrior,wichtounet/budgetwarrior
32a803f5f596444c52e5dd671b59619d00e67687
ionGL/Context.cpp
ionGL/Context.cpp
#include "Context.h" #include <GL/glew.h> #include "Utilities.h" namespace ion { namespace GL { void Context::Init() { CheckedGLCall(glEnable(GL_DEPTH_TEST)); } void Context::Clear(std::initializer_list<EBuffer> Buffers) { static u32 const BufferLookup[3] = { GL_COLOR_B...
#include "Context.h" #include <GL/glew.h> #include "Utilities.h" namespace ion { namespace GL { void Context::Init() { CheckedGLCall(glEnable(GL_DEPTH_TEST)); CheckedGLCall(glDepthFunc(GL_LEQUAL)); } void Context::Clear(std::initializer_list<EBuffer> Buffers) { static u32 co...
Add LEQUAL depth function to context init
Add LEQUAL depth function to context init --HG-- branch : SceneOverhaul
C++
mit
iondune/ionEngine,iondune/ionEngine
c7ff2da3b45de66a7d4af0e5f0d173adfff221e8
Testing/Code/_TDD.cpp
Testing/Code/_TDD.cpp
#include "_TDDConfigure.h" // BTK error messages are not displayed #define TDD_SILENT_CERR int main() { #if defined(TDD_SILENT_CERR) std::streambuf* standardErrorOutput = std::cerr.rdbuf(0); #endif int err = CxxTest::ErrorPrinter().run(); #if defined(TDD_SILENT_CERR) std::cerr.rdbuf(standardErrorOutput); #e...
#include "_TDDConfigure.h" #include <btkLogger.h> // BTK error messages are not displayed #define TDD_SILENT_CERR int main() { #if defined(TDD_SILENT_CERR) btk::Logger::SetVerboseMode(btk::Logger::Quiet); #endif return CxxTest::ErrorPrinter().run();; }; #include <cxxtest/Root.cpp>
Use of the command btk::Logger::SetVerbose instead of setting the stream buffer of std::cerr to null when the symbol TDD_SILENT_CERR is defined.
[UPD] Use of the command btk::Logger::SetVerbose instead of setting the stream buffer of std::cerr to null when the symbol TDD_SILENT_CERR is defined.
C++
bsd-3-clause
letaureau/b-tk.core,letaureau/b-tk.core,Biomechanical-ToolKit/BTKCore,xyproto/b-tk.core,letaureau/b-tk.core,letaureau/b-tk.core,xyproto/b-tk.core,xyproto/b-tk.core,xyproto/b-tk.core,Biomechanical-ToolKit/BTKCore,Biomechanical-ToolKit/BTKCore,letaureau/b-tk.core,Biomechanical-ToolKit/BTKCore,xyproto/b-tk.core,letaureau/...
c0900d005ab20b38286ec69ad3a64208a5aa6a03
examples/nested_template.cpp
examples/nested_template.cpp
template<typename First, typename Second> class Pair { private: First first; Second second; public: template<typename Third> class Inner { Third third; }; }; int main(int argc, char *argv[]) { Pair<int,double> pp1; Pair<int,int> pp2; Pair<int,double>::Inner<char> p; Pai...
template<typename First, typename Second> class Pair { private: First first; Second second; public: virtual ~Pair() {} template<typename Third> class Inner { Third third; }; }; int main(int argc, char *argv[]) { Pair<int,double> pp1; Pair<int,int> pp2; Pair<int,double...
Add virtual to nested template example
Add virtual to nested template example
C++
mit
plast-lab/cclyzer,plast-lab/llvm-datalog
20c94f3b5a008bc6ecac0b04202852cf40899d9b
chrome/browser/extensions/extension_bookmarks_apitest.cc
chrome/browser/extensions/extension_bookmarks_apitest.cc
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Bookmarks) { // TODO(erikkay) no initial state fo...
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/extension_apitest.h" // TODO(brettw) bug 19866: this test is disabled because it is flaky. IN_PROC_BROWSER_TEST_F...
Disable the Bookmarks ExtensionAPITest becuase it is flaky.
Disable the Bookmarks ExtensionAPITest becuase it is flaky. Review URL: http://codereview.chromium.org/173149 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@23877 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ropik/chromium,adobe/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,ropik/chromium,Crysta...
1aa5230410b04ea9717f7783bd6c375f0270eb01
gl-platform/GLPlatform.cpp
gl-platform/GLPlatform.cpp
#include "GLPlatform.hpp" #include <stdexcept> namespace CPM_GL_PLATFORM_NS { void glPlatformInit() { #ifdef GL_PLATFORM_USING_WIN GLenum err = glewInit(); if (GLEW_OK != err) { throw std::runtime_error("GLEW failed to initialize."); } #endif } } // namespace CPM_GL_PLATFORM_NS
#include "GLPlatform.hpp" #include <stdexcept> namespace CPM_GL_PLATFORM_NS { void glPlatformInit() { #ifdef WIN32 GLenum err = glewInit(); if (GLEW_OK != err) { throw std::runtime_error("GLEW failed to initialize."); } #endif } } // namespace CPM_GL_PLATFORM_NS
Add correct preprocessor check for Windows.
Add correct preprocessor check for Windows.
C++
mit
iauns/cpm-gl-platform,iauns/cpm-gl-platform
39e19d66d6dd90b7d960eca94bf893331f605991
tests/testMiniLcdPCD8544.cpp
tests/testMiniLcdPCD8544.cpp
#include <iostream> #include <string> #include "../lcd/MiniLcdPCD8544.h" using namespace std; /** * Test the WiringPiLcdDisplay implementation */ int main() { unique_ptr<MiniLcdPCD8544> lcd(MiniLcdPCD8544::getLcdDisplayInstance()); lcd->init(); lcd->displayText("Text to display:", 0, 0); cout << "En...
#include <iostream> #include <string> #include "../lcd/MiniLcdPCD8544.h" using namespace std; /** * Test the WiringPiLcdDisplay implementation */ int main() { unique_ptr<MiniLcdPCD8544> lcd(MiniLcdPCD8544::getLcdDisplayInstance()); lcd->init(); lcd->displayText("Text to display:", 0, 0); cout << "En...
Clear display before each text display
Clear display before each text display
C++
apache-2.0
starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser,starksm64/NativeRaspberryPiBeaconParser
a6b96328631446cbe73c7c1f7bb09ab7fdd815f2
src/connections/RandomConn.cpp
src/connections/RandomConn.cpp
/* * RandomConn.cpp * * Created on: Apr 27, 2009 * Author: rasmussn */ #include "RandomConn.hpp" #include <assert.h> #include <string.h> namespace PV { RandomConn::RandomConn(const char * name, HyPerCol * hc, HyPerLayer * pre, HyPerLayer * post, int channel) { this->connId = hc->numberOfConnectio...
/* * RandomConn.cpp * * Created on: Apr 27, 2009 * Author: rasmussn */ #include "RandomConn.hpp" #include <assert.h> #include <string.h> namespace PV { RandomConn::RandomConn(const char * name, HyPerCol * hc, HyPerLayer * pre, HyPerLayer * post, int channel) { this->connId = hc->numberOfConnectio...
Convert to use of axonalArbor syntax.
Convert to use of axonalArbor syntax. git-svn-id: 602a26e73ae9f2a14e2bb95676f2e137fcc39919@1533 7c0444ca-5550-0410-9008-faecdbe78eb5
C++
epl-1.0
dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,PetaVision/OpenPV,PetaVision/OpenPV,dpaiton/OpenPV,PetaVision/OpenPV,PetaVision/OpenPV,dpaiton/OpenPV,PetaVision/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV,dpaiton/OpenPV
1d22c7370fb0741ac2d61251d968af223aced087
display.cpp
display.cpp
#include "display.h" #include "sensor.h" #include <LiquidCrystal.h> // Arduino LCD library #include <Arduino.h> // enables use of byte pics // pin definition for LCD #define LCD_CS 10 #define LCD_DC 9 #define LCD_RST 8 namespace LCD { TFT TFTscreen = TFT(LCD_CS, LCD_DC, LCD_RST); void setup() { // ini...
#include "display.h" #include "sensor.h" #include <LiquidCrystal.h> // Arduino LCD library #include <Arduino.h> // enables use of byte pics #define DISPLAY_RS 14 #define DISPLAY_E 15 #define DISPLAY_D4 5 #define DISPLAY_D5 4 #define DISPLAY_D6 3 #define DISPLAY_D7 2 namespace LCD { TFT TFTscreen = TFT(LCD_CS, LC...
Update pin definitions for 16x2 lcd
Update pin definitions for 16x2 lcd
C++
mit
satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop,satelliteworkshops/arduino-workshop
6c473712469389a9e2fba6ef4cc5088d7d615c69
tests/test_system.cpp
tests/test_system.cpp
#include <gtest/gtest.h> #include <system.h> #include "mock_memorymodule.h" class SystemTest : public testing::Test { protected: System sys; StrictMockMemoryModule mem; }; //Dumy test TEST_F(SystemTest, TestMemoryAddressTranslation) { unsigned char dummy_buffer[10]; sys.installMemory(mem, 10, 10); ...
#include <gtest/gtest.h> #include <errors.h> #include <system.h> #include "mock_memorymodule.h" class SystemTest : public testing::Test { protected: System sys; StrictMockMemoryModule mem; }; //Dumy test TEST_F(SystemTest, TestMemoryAddressTranslation) { unsigned char dummy_buffer[10]; int iret; ...
Create example memory read test
Create example memory read test
C++
mit
aroxby/cpu,aroxby/cpu
c6b2926d63f5d1b67c60150b09f3af0b1cd57771
src/test/test_bitcoin.cpp
src/test/test_bitcoin.cpp
#define BOOST_TEST_MODULE Bitcoin Test Suite #include <boost/test/unit_test.hpp> #include "db.h" #include "txdb.h" #include "main.h" #include "wallet.h" CWallet* pwalletMain; CClientUIInterface uiInterface; extern bool fPrintToConsole; extern void noui_connect(); struct TestingSetup { CCoinsViewDB *pcoinsdbview...
#define BOOST_TEST_MODULE Bitcoin Test Suite #include <boost/test/unit_test.hpp> #include "db.h" #include "txdb.h" #include "main.h" #include "wallet.h" CWallet* pwalletMain; CClientUIInterface uiInterface; extern bool fPrintToConsole; extern void noui_connect(); struct TestingSetup { CCoinsViewDB *pcoinsdbview...
Fix tests after cache tweaks
Fix tests after cache tweaks
C++
mit
Infernoman/crowncoin,domob1812/crowncoin,syscoin/syscoin,Crowndev/crowncoin,syscoin/syscoin,Infernoman/crowncoin,Earlz/dobbscoin-source,Infernoman/crowncoin,Infernoman/crowncoin,domob1812/crowncoin,Infernoman/crowncoin,dobbscoin/dobbscoin-source,Crowndev/crowncoin,domob1812/crowncoin,domob1812/crowncoin,syscoin/syscoin...
110a215a137ebe1f0c70e86cfa59fa33d059f8f5
observable-ip-address/observable-ip-address.cpp
observable-ip-address/observable-ip-address.cpp
// observable-ip-address.cpp : Defines the entry point for the console application. // #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { return 0; }
// observable-ip-address.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <winsock2.h> #include <iphlpapi.h> #include <stdio.h> #include <windows.h> #pragma comment(lib, "iphlpapi.lib") #pragma comment(lib, "ws2_32.lib") int _tmain(int argc, _TCHAR* argv[]) { OVERLAPPED ove...
Add code that hangs until the IP address changes
Add code that hangs until the IP address changes
C++
mit
ApocalypticOctopus/observable-ip-address
55217f6387d9b47ab6f48fc86083a11b1df23e27
remoting/protocol/key_event_tracker.cc
remoting/protocol/key_event_tracker.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/protocol/key_event_tracker.h" #include "base/logging.h" #include "remoting/proto/event.pb.h" namespace remoting { namespace proto...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "remoting/protocol/key_event_tracker.h" #include "base/logging.h" #include "remoting/proto/event.pb.h" namespace remoting { namespace proto...
Remove erroneous DCHECK from KeyEventTracker
Remove erroneous DCHECK from KeyEventTracker Remove DCHECK from KeyEventTracker's destructor that erroneously asserted that the pressed_keys_ set had to be empty before the plugin shutdowns. This DCHECK would fire under valid conditions, e.g. if one would close the browser window while holding down a key. BUG=1147...
C++
bsd-3-clause
hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,M4sse/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-cr...
7c9ba24e2909376baed79299a450d7ad6e54b3c5
assert/advanced_assert.cpp
assert/advanced_assert.cpp
#include "advanced_assert.h" std::function<void (const char*)> AdvancedAssert::_loggingFunc; void AdvancedAssert::setLoggingFunc(const std::function<void (const char*)>& func) { _loggingFunc = func; }
#include "advanced_assert.h" #if defined _DEBUG == (defined NDEBUG || NDEBUG == 1) #error "Either _DEBUG or NDEBUG=1 must be defined" #endif std::function<void (const char*)> AdvancedAssert::_loggingFunc; void AdvancedAssert::setLoggingFunc(const std::function<void (const char*)>& func) { _loggingFunc = f...
Debug / release macros check added (required for normal assert functioning on non-Windows systems)
Debug / release macros check added (required for normal assert functioning on non-Windows systems)
C++
mit
VioletGiraffe/cpputils,VioletGiraffe/cpputils
de0f4715fe2877b93aee25d785cce7528443c55c
examples/info.cpp
examples/info.cpp
#include <iostream> #include "../src/tisys.hpp" int main(int argc, char** argv){ cout << "Example" <<endl; Filesystem fs; if ( argc == 1 ) fs.info("."); else fs.info( argv[1] ); cout << fs; return 0; }
#include <iostream> #include "../src/tisys.hpp" using namespace std; int main(int argc, char** argv){ cout << "Example" <<endl; Filesystem fs; if ( argc == 1 ) fs.info("."); else fs.info( argv[1] ); cout << fs; return 0; }
Put the using namespace std in the cpp files
Put the using namespace std in the cpp files
C++
lgpl-2.1
bombark/TiSys,bombark/TiSys
4d4303aea38d8b3039d377b599b2a39ad30604de
cpp/src/build_halide_h.cpp
cpp/src/build_halide_h.cpp
#include <cstdlib> #include <stdio.h> #include <string.h> #include <set> #include <string> #include <assert.h> using namespace std; set<string> done; void dump_header(string header) { if (done.find(header) != done.end()) return; done.insert(header); FILE *f = fopen(header.c_str(), "r"); if (f == NU...
#include <cstdlib> #include <stdio.h> #include <string.h> #include <set> #include <string> #include <assert.h> std::set<std::string> done; void dump_header(std::string header) { if (done.find(header) != done.end()) return; done.insert(header); FILE *f = fopen(header.c_str(), "r"); if (f == NULL) { ...
Remove dependency on importing std into global namespace.
Remove dependency on importing std into global namespace.
C++
mit
lglucin/Halide,kgnk/Halide,rodrigob/Halide,myrtleTree33/Halide,ronen/Halide,aam/Halide,smxlong/Halide,rodrigob/Halide,smxlong/Halide,gchauras/Halide,gchauras/Halide,damienfir/Halide,adasworks/Halide,jiawen/Halide,mcanthony/Halide,aam/Halide,tdenniston/Halide,psuriana/Halide,ayanazmat/Halide,lglucin/Halide,dan-tull/Hali...
43a722e34409b77ca052edc6efc27dba3c39af4f
src/backend/opencl/ctx.cpp
src/backend/opencl/ctx.cpp
#include <ctx.hpp> #include <cl.hpp> #include <vector> namespace opencl { using std::vector; using cl::Platform; using cl::Device; void ctxCB(const char *errinfo, const void *private_info, size_t cb, void *user_data) { printf("Context Error: %s\n", errinfo); fflush(stdout); } const cl::Context& getCtx(unsigned ...
#include <ctx.hpp> #include <cl.hpp> #include <vector> namespace opencl { using std::vector; using cl::Platform; using cl::Device; void ctxCB(const char *errinfo, const void *private_info, size_t cb, void *user_data) { printf("Context Error: %s\n", errinfo); fflush(stdout); } const cl::Context& getCtx(unsigned ...
Create context using DEFAULT instead of CPU for OpenCL backend
Create context using DEFAULT instead of CPU for OpenCL backend Fixes Issue #18 on Linux
C++
bsd-3-clause
mrgloom/arrayfire,merlin-ext/arrayfire,9prady9/arrayfire,merlin-ext/arrayfire,Keno/arrayfire,bkloppenborg/arrayfire,hshindo/arrayfire,asifmadnan/arrayfire,bkloppenborg/arrayfire,pombredanne/arrayfire,HolyGeneralK/arrayfire,bkloppenborg/arrayfire,kylelutz/arrayfire,marbre/arrayfire,umar456/arrayfire,umar456/arrayfire,sh...
4498fe1bda851a29089f51605c3988edfdad65b7
skia/sgl/SkTypeface_fake.cpp
skia/sgl/SkTypeface_fake.cpp
#include "SkTypeface.h" // ===== Begin Chrome-specific definitions ===== uint32_t SkTypeface::UniqueID(const SkTypeface* face) { return NULL; } void SkTypeface::serialize(SkWStream* stream) const { } SkTypeface* SkTypeface::Deserialize(SkStream* stream) { return NULL; } // ===== End Chrome-specific definitio...
#include "SkTypeface.h" // ===== Begin Chrome-specific definitions ===== uint32_t SkTypeface::UniqueID(const SkTypeface* face) { return 0; } void SkTypeface::serialize(SkWStream* stream) const { } SkTypeface* SkTypeface::Deserialize(SkStream* stream) { return NULL; } // ===== End Chrome-specific definitions ...
Return 0 instead of NULL for a non-pointer type. Eliminates a warning in GCC.
Return 0 instead of NULL for a non-pointer type. Eliminates a warning in GCC. git-svn-id: http://src.chromium.org/svn/trunk/src@981 4ff67af0-8c30-449e-8e8b-ad334ec8d88c Former-commit-id: a451f742be414b7375e383968a9a47153da51447
C++
bsd-3-clause
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
bc3899989854368c459f8bb41ebb49ea9d65909d
test/test_Sphere.cc
test/test_Sphere.cc
#include "gtest/gtest.h" #include "../include/rainy.h" using namespace rainy; TEST(SphereTest, InstanceTest) { Sphere sp(1.0, Vector3(0.0, 0.0, 0.0), Color(), Color(0.75, 0.75, 0.75), REFLECTION_DIFFUSE); EXPECT_EQ(0.0, sp.center().x()); EXPECT_EQ(0.0, sp.center().y()); EXPECT_EQ(0.0, sp.center().z()...
#include "gtest/gtest.h" #include "../include/rainy.h" using namespace rainy; TEST(SphereTest, InstanceTest) { Sphere sp(2.0, Vector3(0.0, 0.0, 0.0), Color(), Color(0.75, 0.75, 0.75), REFLECTION_DIFFUSE); EXPECT_EQ(0.0, sp.center().x()); EXPECT_EQ(0.0, sp.center().y()); EXPECT_EQ(0.0, sp.center().z()...
Add test code for Sphere intersection.
Add test code for Sphere intersection.
C++
mit
tatsy/spica,tatsy/spica,tatsy/spica
b2134362e27459f1098a35effedad91e2d553192
ipc/mojo/ipc_mojo_handle_attachment.cc
ipc/mojo/ipc_mojo_handle_attachment.cc
// Copyright (c) 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ipc/mojo/ipc_mojo_handle_attachment.h" #include "ipc/ipc_message_attachment_set.h" #include "third_party/mojo/src/mojo/edk/embedder/embedde...
// Copyright (c) 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ipc/mojo/ipc_mojo_handle_attachment.h" #include "ipc/ipc_message_attachment_set.h" #include "third_party/mojo/src/mojo/edk/embedder/embedde...
Fix leak of PlatformHandleDispatchers in Mojo IPC
Fix leak of PlatformHandleDispatchers in Mojo IPC PassWrappedPlatformHandle does not close the MojoHandle. The destructor of ScopedHandleBase will however close it. The problem with this code was that it called release() on the ScopedHandle, preventing the destructor from being called, and thus also the MojoHandle fro...
C++
bsd-3-clause
Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chr...
050385dd610ada489fb2fecadbe667ad50d0b387
xchainer/python/error.cc
xchainer/python/error.cc
#include "xchainer/python/error.h" #include "xchainer/error.h" #include "xchainer/python/common.h" namespace xchainer { namespace py = pybind11; // standard convention void InitXchainerError(pybind11::module& m) { py::register_exception<XchainerError>(m, "XchainerError"); py::register_exception<BackendErr...
#include "xchainer/python/error.h" #include "xchainer/error.h" #include "xchainer/python/common.h" namespace xchainer { namespace py = pybind11; // standard convention void InitXchainerError(pybind11::module& m) { py::register_exception<XchainerError>(m, "XchainerError"); py::register_exception<ContextErr...
Add python binding to ContextError
Add python binding to ContextError
C++
mit
okuta/chainer,chainer/chainer,okuta/chainer,niboshi/chainer,wkentaro/chainer,jnishi/chainer,niboshi/chainer,chainer/chainer,jnishi/chainer,okuta/chainer,wkentaro/chainer,keisuke-umezawa/chainer,chainer/chainer,tkerola/chainer,keisuke-umezawa/chainer,ktnyt/chainer,ktnyt/chainer,chainer/chainer,keisuke-umezawa/chainer,pf...
0e537ebaa0a05a873245fe67cd4376ccb2b5aefa
sky/tools/sky_snapshot/vm.cc
sky/tools/sky_snapshot/vm.cc
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/tools/sky_snapshot/vm.h" #include "base/logging.h" #include "sky/tools/sky_snapshot/loader.h" #include "sky/tools/sky_snapshot/logging.h" ...
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "sky/tools/sky_snapshot/vm.h" #include "base/logging.h" #include "sky/tools/sky_snapshot/loader.h" #include "sky/tools/sky_snapshot/logging.h" ...
Load deferred import libraries when building the snapshot
Load deferred import libraries when building the snapshot Without this, Dart will attempt to resolve deferred imports at runtime, which is not feasible in Flutter
C++
bsd-3-clause
flutter/engine,abarth/sky_engine,mpcomplete/engine,lyceel/engine,rmacnak-google/engine,lyceel/engine,jamesr/flutter_engine,chinmaygarde/flutter_engine,jamesr/sky_engine,mpcomplete/engine,chinmaygarde/flutter_engine,devoncarew/engine,krisgiesing/sky_engine,abarth/sky_engine,lyceel/engine,jamesr/sky_engine,lyceel/engine,...
6fac364468105fdb54a8c685602a9590cb7dde84
src/kernel/kernconf.cc
src/kernel/kernconf.cc
#include <kernel/kernconf.hh> USDK_API kernconf_type kernconf = { // Default is large enough until we enable a mechanism to dynamically // reallocate task space on demand. /* .default_stack_size = */ 128 * 1024, /* .minimum_stack_size = */ 4 * 1024 };
#include <kernel/config.h> #include <kernel/kernconf.hh> USDK_API kernconf_type kernconf = { // Default is large enough until we enable a mechanism to dynamically // reallocate task space on demand. /* .default_stack_size = */ URBI_KERNEL_STACK_SIZE * 1024, /* .minimum_stack_size = */ 4 * 1024 ...
Use the stack size provided by configure.
Use the stack size provided by configure. * src/kernel/kernconf.cc: Here.
C++
bsd-3-clause
aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,aldebaran/urbi,urbiforge/urbi,urbiforge/urbi
89828e2b0b4732a578a2fa27b65a71348a9b56bc
src/warnings.cpp
src/warnings.cpp
// cfiles, an analysis frontend for the Chemfiles library // Copyright (C) Guillaume Fraux and contributors -- BSD license #include <iostream> #include <set> #include "warnings.hpp" void warn(std::string message) { std::cerr << "[cfiles] " << message << std::endl; } void warn_once(std::string message) { stat...
// cfiles, an analysis frontend for the Chemfiles library // Copyright (C) Guillaume Fraux and contributors -- BSD license #include <iostream> #include <set> #include "warnings.hpp" void warn(std::string message) { std::cerr << "[cfiles] " << message << std::endl; } void warn_once(std::string message) { stat...
Fix warn_once to effectively warn once
Fix warn_once to effectively warn once
C++
mpl-2.0
chemfiles/chrp,Luthaf/chrp
0ae7164962c9a06c0ae0085197eb8720331a5410
planning/simulation/interactable_geometry.cc
planning/simulation/interactable_geometry.cc
#include "planning/simulation/interactable_geometry.hh" namespace jcc { namespace simulation { std::vector<RayIntersection> InteractableGeometry::all_intersections( const geometry::Ray& ray) { std::vector<RayIntersection> intersections; for (const auto& bbox : aabb_) { const auto intersection = bbox.secon...
#include "planning/simulation/interactable_geometry.hh" #include <algorithm> namespace jcc { namespace simulation { std::vector<RayIntersection> InteractableGeometry::all_intersections( const geometry::Ray& ray) { std::vector<RayIntersection> intersections; for (const auto& bbox : aabb_) { const auto int...
Sort ray-intersected boxes by distance
Sort ray-intersected boxes by distance
C++
mit
jpanikulam/experiments,jpanikulam/experiments,jpanikulam/experiments,jpanikulam/experiments
3128b5abf0265394f476827fd6216e87a4950ae7
test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
test/libcxx/utilities/variant/variant.variant/variant.helper/variant_alternative.fail.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Mark the recent variant test as UNSUPPORTED for C++ before 17
Mark the recent variant test as UNSUPPORTED for C++ before 17 git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@305198 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
1bcf0d8a4471ed3db7bc2becfda9e47bf8ec681a
aws-cpp-sdk-text-to-speech-tests/RunTests.cpp
aws-cpp-sdk-text-to-speech-tests/RunTests.cpp
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or ...
/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or ...
Revert text-to-speech-test from using exact memory manager
Revert text-to-speech-test from using exact memory manager
C++
apache-2.0
jt70471/aws-sdk-cpp,cedral/aws-sdk-cpp,jt70471/aws-sdk-cpp,jt70471/aws-sdk-cpp,aws/aws-sdk-cpp,cedral/aws-sdk-cpp,JoyIfBam5/aws-sdk-cpp,aws/aws-sdk-cpp,awslabs/aws-sdk-cpp,jt70471/aws-sdk-cpp,cedral/aws-sdk-cpp,cedral/aws-sdk-cpp,awslabs/aws-sdk-cpp,aws/aws-sdk-cpp,aws/aws-sdk-cpp,jt70471/aws-sdk-cpp,JoyIfBam5/aws-sdk-...
b4cd00128d7db9bfe005dfdb3c43ade1f2ba6e9c
tests/utils/IntPointTest.cpp
tests/utils/IntPointTest.cpp
// Copyright (c) 2022 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. #include "utils/IntPoint.h" #include <gtest/gtest.h> // NOLINTBEGIN(*-magic-numbers) namespace cura { TEST(IntPointTest, TestRotationMatrix) { PointMatrix rot2d(90); Point3Matrix rot_homogeneous(rot2d); ...
// Copyright (c) 2022 Ultimaker B.V. // CuraEngine is released under the terms of the AGPLv3 or higher. #include "utils/IntPoint.h" #include <gtest/gtest.h> // NOLINTBEGIN(*-magic-numbers) namespace cura { TEST(IntPointTest, TestRotationMatrix) { PointMatrix rot2d(90); Point3Matrix rot_homogeneous(rot2d); ...
Make sure Point is made of right-sized coord's.
Make sure Point is made of right-sized coord's. done as part of CURA-9907
C++
agpl-3.0
Ultimaker/CuraEngine,Ultimaker/CuraEngine
b144676fc61ff159ba8cc432def67ae964742e2f
views/controls/menu/menu_config_gtk.cc
views/controls/menu/menu_config_gtk.cc
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/re...
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "views/controls/menu/menu_config.h" #include "grit/app_resources.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/re...
Increase the base font size for touch ui
Increase the base font size for touch ui BUG=none TEST=none Review URL: http://codereview.chromium.org/6519034 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@77349 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,robclark/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,keishi/chromium,anirudhSK/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromiu...
90838e26b2a1c3f5685fc2eba0c864eef295b8fa
c++11/src/logger.cpp
c++11/src/logger.cpp
#include "logger.h" namespace lightstep { //------------------------------------------------------------------------------ // LogDefault //------------------------------------------------------------------------------ static void LogDefault(LogLevel log_level, opentracing::string_view message) n...
#include "logger.h" namespace lightstep { //------------------------------------------------------------------------------ // LogDefault //------------------------------------------------------------------------------ static void LogDefault(LogLevel log_level, opentracing::string_view message) n...
Fix bug when checking log level.
Fix bug when checking log level.
C++
mit
lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp
37b89a4bb8130d95ae75fbb69a3c5b190e2e5c24
test/msan/vector_select.cc
test/msan/vector_select.cc
// RUN: %clangxx_msan -O0 %s -c -o %t // RUN: %clangxx_msan -O3 %s -c -o %t // Regression test for MemorySanitizer instrumentation of a select instruction // with vector arguments. #if defined(__x86_64__) #include <emmintrin.h> __m128d select(bool b, __m128d c, __m128d d) { return b ? c : d; } #elif defined (__mip...
// RUN: %clangxx_msan -O0 %s -c -o %t // RUN: %clangxx_msan -O3 %s -c -o %t // Regression test for MemorySanitizer instrumentation of a select instruction // with vector arguments. #if defined(__x86_64__) #include <emmintrin.h> __m128d select(bool b, __m128d c, __m128d d) { return b ? c : d; } #elif defined (__mip...
Enable this test for PPC64.
Enable this test for PPC64. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@241400 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
31ecec4b659ac3873bfdaf3fee8cb33eab64272e
entity.cpp
entity.cpp
#include "entity.h" using namespace sf; Entity::Entity(EntityShape shape0, Engine *engine0) { shape = shape0; position.x = 0; position.y = 0; isKilledFlag = false; engine = engine0; UID = ++globalUID; } Entity::~Entity() { engine = NULL; } Uint32 Entity::globalUID = 0; Uint32 Entity::getUID(void) const {return...
#include "entity.h" using namespace sf; Entity::Entity(EntityShape shape0, Engine *engine0) { shape = shape0; position.x = 0; position.y = 0; isKilledFlag = false; engine = engine0; if (globalUID & 0x80000000) { globalUID = (globalUID+1) | 0x80000000; } else { globalUID = (globalUID+1) & (~0x80000000); } ...
Make sure entities UID space don't clash between server & client.
Make sure entities UID space don't clash between server & client.
C++
mit
dridk/tankfighter,dridk/tankfighter,dridk/tankfighter
68395f247675cd0a87b91f387ff8d64a25a9f744
ng/netgenpy.cpp
ng/netgenpy.cpp
// a wrapper to load netgen-dll into python #include <iostream> #ifdef NG_PYTHON #include <boost/python.hpp> #endif #ifdef WIN32 #define DLL_HEADER __declspec(dllimport) #else #define DLL_HEADER #endif void DLL_HEADER ExportNetgenMeshing(); void DLL_HEADER ExportMeshVis(); void DLL_HEADER ExportCS...
// a wrapper to load netgen-dll into python #include <iostream> #include <boost/python.hpp> #ifdef WIN32 #define DLL_HEADER __declspec(dllimport) #else #define DLL_HEADER #endif void DLL_HEADER ExportNetgenMeshing(); void DLL_HEADER ExportMeshVis(); void DLL_HEADER ExportCSG(); void DLL_HEADER Export...
Revert "Guard inclusion of boost/python.hpp"
Revert "Guard inclusion of boost/python.hpp" This reverts commit 08a32ff2d4644d4bd602970a7b303ae781353f60. This attempt at guarding the inclusion of boost's Python header did not work.
C++
lgpl-2.1
jwpeterson/netgen,jwpeterson/netgen,jwpeterson/netgen,jwpeterson/netgen,jwpeterson/netgen
e80f61a40de2f5aa1a35339abff4c1477b6b91a1
examples/qmake/websocket-chat-client/main.cpp
examples/qmake/websocket-chat-client/main.cpp
#include <QtWidgets/QApplication> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
#include <QtWidgets/QApplication> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); }
Remove trailing whitespace from example source code
Remove trailing whitespace from example source code
C++
lgpl-2.1
vinipsmaker/tufao,vinipsmaker/tufao,vinipsmaker/tufao
9779619c825adb30f389968dfae3dd51fccd8511
tests/src/AnnGlTFTest.cpp
tests/src/AnnGlTFTest.cpp
#include "engineBootstrap.hpp" #include <catch/catch.hpp> TEST_CASE("Test glTF Loading") { auto GameEngine = Annwvyn::bootstrapTestEngine("GlTF Test"); auto object = Annwvyn::AnnGetGameObjectManager()->createGameObject("Avocado.glb"); object->setPosition(0, 1.6, 9); REQUIRE(object != nullptr); GameEngine->init...
#include "engineBootstrap.hpp" #include <catch/catch.hpp> namespace Annwvyn { TEST_CASE("Test glTF Loading") { auto GameEngine = Annwvyn::bootstrapTestEngine("GlTF Test"); auto object = Annwvyn::AnnGetGameObjectManager()->createGameObject("Avocado.glb"); object->setPosition(0, 1.6, 9); object->setScale(3, 3, 3); ...
Put test in Annwvyn namespace
Put test in Annwvyn namespace
C++
mit
Ybalrid/Annwvyn,Ybalrid/Annwvyn,Ybalrid/Annwvyn
fe887173ee5a30fb913247fa48466d09d7427d41
ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp
ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LegacyViewManagerInteropViewProps.h" namespace facebook { namespace react { LegacyViewManagerInteropViewProps::LegacyVi...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "LegacyViewManagerInteropViewProps.h" namespace facebook { namespace react { static folly::dynamic recursiveMerge( f...
Fix clone of props for legacy interop component
Fix clone of props for legacy interop component Summary: Changelog: [internal] Cloning of `LegacyViewManagerInteropViewProps` causes loss of `sourceProps.otherProps` if the cloning happens before shadow node is mounted. This was happening in WebView and callback `onLoadEnd` was dropped because of this. Reviewed By: ...
C++
mit
janicduplessis/react-native,javache/react-native,janicduplessis/react-native,javache/react-native,pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,facebook/react-native,myntra/react-native,javache/react-native,pandiaraj4...
c1834cbb4f5a8c037c74bf4eebcaa6c10fa35fb5
test_utils/supersonic_test_main.cc
test_utils/supersonic_test_main.cc
// Copyright 2012, Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2012, Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
Make sure to parse gtest_* flags before other flags when running tests.
Make sure to parse gtest_* flags before other flags when running tests.
C++
apache-2.0
romange/supersonic,romange/supersonic,romange/supersonic
b232793189fbd5c11603a0e282a1fc7e9e160a1f
test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
test/libcxx/input.output/file.streams/fstreams/traits_mismatch.fail.cpp
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
Work around Clang bug introduced in r324062
Work around Clang bug introduced in r324062 When Clang encounters an already invalid class declaration, it can emit incorrect diagnostics about the exception specification on some of its members. This patch temporarily works around that incorrect diagnostic. The clang bug was introduced in r324062. git-svn-id: 756ef...
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
647f44ed65aadb80a6895bc281f1b4b81dae5f03
Puzza/main.cpp
Puzza/main.cpp
#include "main.hpp" int main() { DEV::KeepConsoleOpen keepConsoleOpen; keepConsoleOpen.setKeyRequirement(DEV::KeepConsoleOpen::Escape); try { Game game; game.run(); } catch (int e) { DEV::printLine("Exception caught:\n\"" + pl::stringFrom(e) + "\""); return EXIT_FAILURE; } catch (char* e) { DEV::p...
#include "main.hpp" int main() { DEV::KeepConsoleOpen keepConsoleOpen; keepConsoleOpen.setKeyRequirement(DEV::KeepConsoleOpen::Escape); try { Game game; game.run(); } catch (int e) { DEV::printLine("Exception caught: " + pl::stringFrom(e)); return EXIT_FAILURE; } catch (char* e) { DEV::printLine("...
Change display of int exception
Change display of int exception Int exceptions are now displayed on the same line as the message "exception caught" and the quote marks have been removed from around it.
C++
mit
Hapaxia/MyPracticeBeginnerGames
4b4b2ca2f3770d778aa366e02b73c74934102901
misc_util.cpp
misc_util.cpp
#include "misc_util.h" namespace dlib { void string_fmt_time(std::string& ret) { time_t now = time(NULL); struct tm *t = localtime(&now); while(!strftime((char *)ret.data(), ret.capacity(), "%Y:%m:%d %H:%M", t)) ret.reserve(ret.size() << 1); } }
#include "misc_util.h" namespace dlib { void string_fmt_time(std::string& ret) { time_t now = time(NULL); struct tm *t = localtime(&now); while(!strftime((char *)ret.data(), ret.capacity(), "%Y:%m:%d %H:%M", t)) ret.reserve(ret.capacity() ? ret.capacity() << 1: 16); } }
Fix mistake of using size instead of capacity.
Fix mistake of using size instead of capacity.
C++
mit
noseatbelts/dlib,noseatbelts/dlib
4f4fcf4969d4e233024bd0d9397facc0906db49e
src/search/util/timeout.cc
src/search/util/timeout.cc
/* -*- mode:linux -*- */ /** * \file timeout.cc * * * * \author Ethan Burns * \date 2008-12-16 */ #include <iostream> #include <signal.h> #include <stdlib.h> #include <unistd.h> using namespace std; void alarm_action(int sig) { cout << "No Solution" << endl << "cost: infinity" << endl << "length...
/* -*- mode:linux -*- */ /** * \file timeout.cc * * * * \author Ethan Burns * \date 2008-12-16 */ #include <iostream> #include <signal.h> #include <stdlib.h> #include <unistd.h> using namespace std; void alarm_action(int sig) { cout << "No Solution" << endl << "cost: infinity" << endl << "length...
Initialize the fields of the sigaction structure.
Initialize the fields of the sigaction structure.
C++
mit
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
a720bf5023cf9fdab60ef668aa3a3f9371a0bcb0
questions/styledbutton-20642553/main.cpp
questions/styledbutton-20642553/main.cpp
#include <QPushButton> #include <QHBoxLayout> #include <QApplication> int main(int argc, char *argv[]) { QApplication a{argc, argv}; QWidget w; QHBoxLayout layout{&w}; QPushButton button1{"Default"}; button1.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); layout.addWidget(&button1); Q...
// https://github.com/KubaO/stackoverflown/tree/master/questions/styledbutton-20642553 #include <QPushButton> #include <QHBoxLayout> #include <QApplication> int main(int argc, char *argv[]) { QApplication a{argc, argv}; QWidget w; QHBoxLayout layout{&w}; QPushButton button1{"Default"}; button1.setSizePo...
Add github link, make code narrower.
Add github link, make code narrower.
C++
unlicense
KubaO/stackoverflown,KubaO/stackoverflown,KubaO/stackoverflown
6bbadfe6fce906618aba5eb8e03603d02dcb1735
src/audio/audio.cpp
src/audio/audio.cpp
#include "Arduboy.h" #include "audio.h" bool ArduboyAudio::audio_enabled = false; void ArduboyAudio::on() { audio_enabled = true; } bool ArduboyAudio::enabled() { return audio_enabled; } void ArduboyAudio::off() { audio_enabled = false; } void ArduboyAudio::saveOnOff() { EEPROM.write(EEPROM_AUDIO_ON_OFF, a...
#include "Arduboy.h" #include "audio.h" bool ArduboyAudio::audio_enabled = false; void ArduboyAudio::on() { audio_enabled = true; } bool ArduboyAudio::enabled() { return audio_enabled; } void ArduboyAudio::off() { audio_enabled = false; } void ArduboyAudio::saveOnOff() { EEPROM.update(EEPROM_AUDIO_ON_OFF, ...
Change EEPROM write() to update()
Change EEPROM write() to update()
C++
bsd-3-clause
yyyc514/ArduboyLib,Arduboy/Arduboy,yyyc514/ArduboyLib,Arduboy/Arduboy
a0f80df23010f11cc41e1a7691386a115fc2713f
introduction/linux_gcc_cmake/DisplayImage.cpp
introduction/linux_gcc_cmake/DisplayImage.cpp
// Copyright 2015 Matt Heard // http://mattheard.net // matt@mattheard.net // @mattheard #include <iostream> #include <string> int main(int argc, char **argv) { const int expectedNumArgs = 2; if (argc != expectedNumArgs) { using std::string; const string cmdName = "DisplayImage"; const...
// Copyright 2015 Matt Heard // http://mattheard.net // matt@mattheard.net // @mattheard #include <opencv2/opencv.hpp> #include <iostream> #include <string> int main(int argc, char **argv) { using std::string; const int expectedNumArgs = 2; if (argc != expectedNumArgs) { const string cmdName = "Di...
Read file and finish tutorial
Read file and finish tutorial
C++
mit
MattHeard/OpenCV-Tutorials
31a459272ff7e28efe026ee93f27d1d02b7c15ec
Behaviors/Behavior.cpp
Behaviors/Behavior.cpp
/* * Behavior.cpp * * Created on: Mar 25, 2014 * Author: user */ #include "Behavior.h" Behavior::Behavior(Robot* robot) { // TODO Auto-generated constructor stub _robot = robot; } Behavior* Behavior::addNextBehavior(Behavior* behavior) { this->_nextBehaviors.push_back(behavior); } Behavior* Behavior::...
/* * Behavior.cpp * * Created on: Mar 25, 2014 * Author: user */ #include "Behavior.h" Behavior::Behavior(Robot* robot) { _robot = robot; } Behavior* Behavior::addNextBehavior(Behavior* behavior) { this->_nextBehaviors.push_back(behavior); } Behavior* Behavior::getNextBehavior() { for (vector<Behavior...
Remove the free of behaviors to the plans
Remove the free of behaviors to the plans
C++
apache-2.0
Jossef/robotics,Jossef/robotics
f230e90ce92d98242a8f1777c8491146d0c56514
examples/concurrent_sum.cpp
examples/concurrent_sum.cpp
#include <agency/execution_policy.hpp> #include <vector> int sum(const std::vector<int>& data) { using namespace agency; return bulk_invoke(con(data.size()), [&](concurrent_agent& self, std::vector<int>& scratch) -> single_result<int> { auto i = self.index(); auto n = scratch.size(); wh...
#include <agency/execution_policy.hpp> #include <vector> int sum(const std::vector<int>& data) { using namespace agency; return bulk_invoke(con(data.size()), [&](concurrent_agent& self, std::vector<int>& scratch) -> single_result<int> { auto i = self.index(); auto n = scratch.size(); wh...
Replace use of share<0>() with share()
Replace use of share<0>() with share()
C++
bsd-3-clause
egaburov/agency,egaburov/agency
2d8b66f2197cc3ebc69fb2eae218fbf3a95ec340
src/controls/src/controls_plugin.cpp
src/controls/src/controls_plugin.cpp
/* * Copyright (C) 2015 - Florent Revest <revestflo@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2.1 of the * License, or (at your option) any later v...
/* * Copyright (C) 2015 - Florent Revest <revestflo@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 2.1 of the * License, or (at your option) any later v...
Change system font to Noto Sans.
Change system font to Noto Sans. Co-authored-by: eLtMosen <1cc51aaea07cd6a34e95cf404b134738b7877c01@mosushi.com>
C++
lgpl-2.1
AsteroidOS/qml-asteroid,AsteroidOS/qml-asteroid
0215c4f02ff23ab9150d2593024d63580a2c85e1
test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp
test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp
// RUN: %clang_cc1 -std=c++11 -verify %s alignas(double) void f(); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}} alignas(double) unsigned char c[sizeof(double)]; // expected-note {{previous}} extern unsigned char c[sizeof(double)]; alignas(float) extern unsigned char c...
// RUN: %clang_cc1 -std=c++11 -verify %s -triple x86_64-linux-gnu alignas(double) void f(); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}} alignas(double) unsigned char c[sizeof(double)]; // expected-note {{previous}} extern unsigned char c[sizeof(double)]; alignas(floa...
Add a triple to this test so it passes for targets where alignof(double) really should be equal to alignof(float).
Add a triple to this test so it passes for targets where alignof(double) really should be equal to alignof(float). git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@352102 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
40aab58ef58b83c46a33bdb36ddbae54ffc79f04
main.cpp
main.cpp
#include <iostream> //Thomas' Prototypes //Hannah's Prototypes int atomic_distance (int x, int y, int z); //Kate's Prototype: defines atomic distance as combination of x, y, z coordinates int (main) { using nedit file... create new input "hannah's test changes" }
#include <iostream> //Thomas' Prototypes //Hannah's Prototypes int atomic_distance (int atom_dist_x, int atom_dist_y, int atom_dist_z); //Kate's Prototype: defines atomic distance as combination of x, y, z coordinates int (main) { using nedit file... create new input "hannah's test changes" }
Update to Kate's First Prototype
Update to Kate's First Prototype made less vague
C++
mit
kchrbnnt/chemistry_structure_shit,kchrbnnt/chemistry_structure_shit
b3ab6eb33206fa5ae65c8a9937912c7b6db5461a
views/conversationview/mailvieweventfilter.cpp
views/conversationview/mailvieweventfilter.cpp
// // C++ Implementation: mailvieweventfilter // // Description: // // // Author: Aron Boström <aron dot bostrom at gmail dot com>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include <QtDebug> #include <QResizeEvent> #include <QWidget> #include "mailvieweventfilter.h" MailV...
// // C++ Implementation: mailvieweventfilter // // Description: // // // Author: Aron Boström <aron dot bostrom at gmail dot com>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #include <QtDebug> #include <QResizeEvent> #include <QWidget> #include "mailvieweventfilter.h" MailV...
Return true if the event was handled.
Return true if the event was handled. svn path=/trunk/KDE/kdepim/; revision=568621
C++
lgpl-2.1
lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi
d0303aab2e9a9d65542d7964c4a6cee416c83fc3
test/msan/no_sanitize_memory_prop.cc
test/msan/no_sanitize_memory_prop.cc
// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t >%t.out 2>&1 // RUN: %clangxx_msan -m64 -O1 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out // RUN: %clangxx_msan -m64 -O2 %s -o %t && not %run %t >%t.out 2>&1 // RUN: FileCheck %s < %t.out // RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.o...
// RUN: %clangxx_msan -m64 -O0 %s -o %t && %run %t >%t.out 2>&1 // RUN: %clangxx_msan -m64 -O1 %s -o %t && %run %t >%t.out 2>&1 // RUN: %clangxx_msan -m64 -O2 %s -o %t && %run %t >%t.out 2>&1 // RUN: %clangxx_msan -m64 -O3 %s -o %t && %run %t >%t.out 2>&1 // Test that (no_sanitize_memory) functions DO NOT propagate sh...
Stop propagating shadow in blacklisted functions.
[msan] Stop propagating shadow in blacklisted functions. With this change all values passed through blacklisted functions become fully initialized. Previous behavior was to initialize all loads in blacklisted functions, but apply normal shadow propagation logic for all other operation. This makes blacklist applicable...
C++
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
104707d8ccdc58411d2f8eb1972b67e4a20020f3
source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
//===-- CPlusPlusLanguage.cpp --------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------...
//===-- CPlusPlusLanguage.cpp --------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------...
Use Language::LanguageIsCPlusPlus instead of doing the same switch over language
Use Language::LanguageIsCPlusPlus instead of doing the same switch over language git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@246613 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb
cc84c27d9897511567f303aa066345abafb04085
test/client_test.cpp
test/client_test.cpp
#include "environment.h" #include <webdriverxx/client.h> #include <gtest/gtest.h> namespace test { using namespace webdriverxx; class TestClient : public ::testing::Test { protected: static void SetUpTestCase() { client = new Client(GetWebDriverUrl()); } static void TearDownTestCase() { delete client; clie...
#include "environment.h" #include <webdriverxx/client.h> #include <gtest/gtest.h> namespace test { using namespace webdriverxx; class TestClient : public ::testing::Test { protected: static void SetUpTestCase() { client = new Client(GetWebDriverUrl()); } static void TearDownTestCase() { delete client; clie...
Fix wrong parameters order in client test
Fix wrong parameters order in client test
C++
mit
sekogan/webdriverxx,sekogan/webdriverxx,sekogan/webdriverxx
f8bd9018f9cb3a36bbd7895a4f850d45040040ea
example/debug/debug.cc
example/debug/debug.cc
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ht...
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* * Copyright 2013 Couchbase, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ht...
Fix buildbreak for missing error code from cstdlib
Fix buildbreak for missing error code from cstdlib Change-Id: I6b15a0d0169161f24a81a571ceb6dabfacc87eb2 Reviewed-on: http://review.couchbase.org/23983 Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com> Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
C++
apache-2.0
uvenum/libcouchbase,avsej/libcouchbase,kojiromike/libcouchbase,trondn/libcouchbase,avsej/libcouchbase,trondn/libcouchbase,avsej/libcouchbase,uvenum/libcouchbase,mnunberg/libcouchbase,trondn/libcouchbase,signmotion/libcouchbase,maxim-ky/libcouchbase,senthilkumaranb/libcouchbase,mody/libcouchbase,avsej/libcouchbase,couch...
1c0a578929ad4540f6ace6f02b1c13348134f9f7
src/string_split.cc
src/string_split.cc
#include "string_split.h" namespace psz { std::vector<std::string> SplitString(const std::string& str, const std::string& sep) { std::vector<std::string> results; size_t prev = 0; size_t pos = str.find(sep); while (pos != std::string::npos) { results.push_back(str.subs...
#include "string_split.h" namespace psz { std::vector<std::string> SplitString(const std::string& str, const std::string& sep) { std::vector<std::string> results; size_t prev = 0; size_t pos = str.find(sep); while (pos != std::string::npos) { // TODO optimize! auto...
Fix empty string being added to string vector.
Fix empty string being added to string vector.
C++
bsd-3-clause
orian/psz_utils,orian/psz_utils,orian/psz_utils
230406e156a516257a913a3e730bb02ae663f2df
samples/sprite/win/main.cpp
samples/sprite/win/main.cpp
// Copyright (C) 2015 Elviss Strazdins // This file is part of the Ouzel engine. #include <Windows.h> #include "Application.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ouzel::Application* application = new ouzel::Application(); //TODO: create main window ...
// Copyright (C) 2015 Elviss Strazdins // This file is part of the Ouzel engine. #include <windows.h> #include "Application.h" int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { ouzel::Application* application = new ouzel::Application(); //TODO: create main window ...
Fix the case of windows.h for consistency
Fix the case of windows.h for consistency
C++
unlicense
elnormous/ouzel,Hotspotmar/ouzel,elvman/ouzel,elnormous/ouzel,elnormous/ouzel,Hotspotmar/ouzel,elvman/ouzel,Hotspotmar/ouzel
7cded3866cbede99abee3f3032e3b792e3b86191
c++11/test/logger_test.cpp
c++11/test/logger_test.cpp
#include "../src/logger.h" #define CATCH_CONFIG_MAIN #include <lightstep/catch/catch.hpp> using namespace lightstep; TEST_CASE("logger") { LogLevel logged_level = LogLevel::off; std::string logged_message; Logger logger{[&](LogLevel level, opentracing::string_view message) { logged_level = level; logge...
#include "../src/logger.h" #define CATCH_CONFIG_MAIN #include <lightstep/catch/catch.hpp> using namespace lightstep; TEST_CASE("logger") { LogLevel logged_level = LogLevel::off; std::string logged_message; Logger logger{[&](LogLevel level, opentracing::string_view message) { logged_level = level; logge...
Add concatenation test to logger.
Add concatenation test to logger.
C++
mit
lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp,lightstep/lightstep-tracer-cpp
e7b04868ea410c846e4c63c80e32538bbc693264
lib/Tooling/ArgumentsAdjusters.cpp
lib/Tooling/ArgumentsAdjusters.cpp
//===--- ArgumentsAdjusters.cpp - Command line arguments adjuster ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- ArgumentsAdjusters.cpp - Command line arguments adjuster ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Make clang tools ignore -fcolor-diagnostics and -fdiagnostics-color retrieved from the compilation database.
Make clang tools ignore -fcolor-diagnostics and -fdiagnostics-color retrieved from the compilation database. Summary: Clang tools' diagnostic output could be force colored when a command line from the compilation database contains -fcolor-diagnostics or -fdiagnostics-color. This is not what we want e.g. for vim integr...
C++
apache-2.0
llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
8ae61fdd231dec389704781e9abf69398b521578
src/test_picker.cpp
src/test_picker.cpp
#include "ui/region_picker.hpp" int main() { EasyGIF::UI::RegionPicker picker(false); picker.Activate(); while(picker.IsRunning()) { picker.UpdateEvents(); picker.ProcessInput(); picker.Draw(); } return 0; }
#include "img/image_frame.hpp" #include "img/image_grabber.hpp" #include "img/image_saver.hpp" #include "ui/region_picker.hpp" #include <unistd.h> int main() { EasyGIF::UI::RegionPicker picker(false); EasyGIF::ImageFrame frame; EasyGIF::ImageGrabber grabber; EasyGIF::ImageSaver saver; picker.Activate(); while(pi...
Test for saving a selected region to a file
Test for saving a selected region to a file
C++
mit
tomezpl/EasyGIF,tomezpl/EasyGIF
bfdeebe850c23f49f2fbf023fd60cf6555707a25
projects/color_finder/src/main.cpp
projects/color_finder/src/main.cpp
#include <cassert> #include <iostream> #include "ColorFinder.hpp" int main() { constexpr ColorFinder::Color c{0x82, 0x12, 0x18}; constexpr auto name = getClosestColorName(c); std::cout << name << std::endl; return 0; }
#include <cassert> #include <iostream> #include "ColorFinder.hpp" int main() { constexpr ColorFinder::Color c{0x82, 0x12, 0x18}; constexpr auto name = getClosestColorName(c); static_assert(name == "Falu Red", "Something went wrong"); std::cout << name << std::endl; return 0; }
Add static_assert to check evaluated value
Add static_assert to check evaluated value
C++
mit
antaljanosbenjamin/miscellaneous,antaljanosbenjamin/miscellaneous
c6e72070953fd8c6c2e1d03328ea07b5d52a0b81
tools/evm2wasm/main.cpp
tools/evm2wasm/main.cpp
#include <string> #include <iostream> #include <fstream> #include <streambuf> #include <evm2wasm.h> using namespace std; int main(int argc, char **argv) { if (argc < 2) { cerr << "Usage: " << argv[0] << " <EVM file>" << endl; return 1; } ifstream input(argv[1]); if (!input.is_open())...
#include <string> #include <iostream> #include <fstream> #include <streambuf> #include <evm2wasm.h> using namespace std; int main(int argc, char **argv) { if (argc < 2) { cerr << "Usage: " << argv[0] << " <EVM file> [--wast]" << endl; return 1; } bool wast = false; if (argc == 3) { ...
Add --wast option to evm2wasm CLI
Add --wast option to evm2wasm CLI
C++
mpl-2.0
ewasm/evm2wasm,ewasm/evm2wasm
e15104d458c6e556c9a0edbdad161df648bc0f80
src/Genes/Freedom_To_Move_Gene.cpp
src/Genes/Freedom_To_Move_Gene.cpp
#include "Genes/Freedom_To_Move_Gene.h" #include <string> #include "Genes/Gene.h" #include "Game/Board.h" #include "Game/Color.h" double Freedom_To_Move_Gene::score_board(const Board& board, Piece_Color perspective, size_t) const noexcept { static auto initial_score = double(Board().legal_moves().size()); if...
#include "Genes/Freedom_To_Move_Gene.h" #include <string> #include "Genes/Gene.h" #include "Game/Board.h" #include "Game/Color.h" double Freedom_To_Move_Gene::score_board(const Board& board, Piece_Color perspective, size_t) const noexcept { static const auto initial_score = double(Board().legal_moves().size()); ...
Add const to constant value
Add const to constant value
C++
mit
MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess,MarkZH/Genetic_Chess
a5099bb5961bf58658a7968c751bf10998787f7f
JASP-Desktop/main.cpp
JASP-Desktop/main.cpp
#include "mainwindow.h" #include <QApplication> #include <QDialog> #include <QGridLayout> #include <QLayout> #include <QDebug> #include "application.h" int main(int argc, char *argv[]) { QCoreApplication::setOrganizationName("JASP"); QCoreApplication::setOrganizationDomain("jasp-stats.org"); QCoreApplication::set...
#include "mainwindow.h" #include <QApplication> #include <QDialog> #include <QGridLayout> #include <QLayout> #include <QDebug> #include "application.h" int main(int argc, char *argv[]) { QCoreApplication::setOrganizationName("JASP"); QCoreApplication::setOrganizationDomain("jasp-stats.org"); QCoreApplication::set...
Fix to unicode cmd line argument handling
Fix to unicode cmd line argument handling
C++
agpl-3.0
aknight1-uva/jasp-desktop,FransMeerhoff/jasp-desktop,raviselker/jasp-desktop,vankesteren/jasp-desktop,dostodabsi/jasp-desktop,jasp-stats/jasp-desktop,jasp-stats/jasp-desktop,jasp-stats/jasp-desktop,dostodabsi/jasp-desktop,TimKDJ/jasp-desktop,AlexanderLyNL/jasp-desktop,aknight1-uva/jasp-desktop,jasp-stats/jasp-desktop,f...
ddb9c5d6c4f958a6370837b4abffa9dc69a1d90b
src/logger.cpp
src/logger.cpp
/* Copyright (c) 2014 DataStax Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
/* Copyright (c) 2014 DataStax Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
Fix to work with different definitions of cass_uint64_t
Fix to work with different definitions of cass_uint64_t
C++
apache-2.0
flightaware/cpp-driver,datastax/cpp-driver,flightaware/cpp-driver,tempbottle/cpp-driver,hpcc-systems/cpp-driver,mikefero/cpp-driver,datastax/cpp-driver,mpenick/cpp-driver,zhangpng/cpp-driver,mikefero/cpp-driver,datastax/cpp-driver,mikefero/cpp-driver,Teino1978-Corp/cpp-driver,Teino1978-Corp/cpp-driver,hpcc-systems/cpp-...
c5dfa3e5921e07569f95f4670537a827c95b7175
PrimaryTreeIndex.cpp
PrimaryTreeIndex.cpp
#include "PrimaryTreeIndex.h" void PrimaryTreeIndex::buildIndex(Table & table, int column) { int rowno = 0; for(auto &currentRow : table) { index.emplace(currentRow[column], rowno++); } } int PrimaryTreeIndex::size() const { return index.size(); } int PrimaryTreeIndex::exactMatch(const std::s...
#include "PrimaryTreeIndex.h" void PrimaryTreeIndex::buildIndex(Table & table, int column) { int rowno = 0; for(auto &currentRow : table) { index.emplace(currentRow[column], rowno++); } } int PrimaryTreeIndex::size() const { return index.size(); } int PrimaryTreeIndex::exactMatch(const std::s...
Simplify bestMatch code as lower_bound = upper_bound when no exact match found
Simplify bestMatch code as lower_bound = upper_bound when no exact match found
C++
apache-2.0
spakai/index_search,spakai/index_search
618ae7b2cbbbea7e26d9a2c6dfbb7d1da07cd3cf
chewingwrapper/test/test-chewingwrapper.cpp
chewingwrapper/test/test-chewingwrapper.cpp
#include <iostream> #include <memory> #include <windows.h> #include <chewingwrapper.hpp> int main() { SetEnvironmentVariable("CHEWING_PATH", CHEWING_PATH); SetEnvironmentVariable("CHEWING_USER_PATH", CHEWING_USER_PATH); const wchar_t EXPECT[] = { 0x6e2c, 0x8a66, 0 /* 測試 */ }; ChewingWrapper ctx; ...
#include <iostream> #include <memory> #include <windows.h> #include <chewingwrapper.hpp> int main() { // XXX: Use SetEnvironmentVariableA here will cause crash in Visual Studio. _putenv("CHEWING_PATH="CHEWING_PATH); _putenv("CHEWING_USER_PATH="CHEWING_USER_PATH); const wchar_t EXPECT[] = { 0x6e2c, 0...
Use _putenv instead of SetEnvironmentVariable
Use _putenv instead of SetEnvironmentVariable
C++
lgpl-2.1
shaunstanislaus/PIME,divazone/PIME,jrjang/PIME,Chocobo1/windows-chewing-tsf,jrjang/PIME,chewing/windows-chewing-tsf,shaunstanislaus/PIME,divazone/PIME,Chocobo1/windows-chewing-tsf,blmlove409/PIME,shaunstanislaus/PIME,blmlove409/PIME,tjjh89017/PIME,jrjang/PIME,divazone/PIME,blmlove409/PIME,tjjh89017/PIME,chewing/windows...
aa6b9a502582534a9853bab5b32a8103380809cd
atom/common/api/event_emitter_caller.cc
atom/common/api/event_emitter_caller.cc
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/common/api/event_emitter_caller.h" #include "atom/common/api/locker.h" #include "atom/common/node_includes.h" namespace mate { namespace internal { v8::Local<v8::Val...
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/common/api/event_emitter_caller.h" #include "atom/common/api/locker.h" #include "atom/common/node_includes.h" namespace mate { namespace internal { v8::Local<v8::Val...
Fix crash when emitting unhandled error on native EventEmitter
Fix crash when emitting unhandled error on native EventEmitter
C++
mit
seanchas116/electron,electron/electron,seanchas116/electron,bpasero/electron,the-ress/electron,the-ress/electron,bpasero/electron,Floato/electron,electron/electron,seanchas116/electron,the-ress/electron,the-ress/electron,thomsonreuters/electron,electron/electron,bpasero/electron,thomsonreuters/electron,gerhardberger/el...
c2a765c27f160a55d7fa8a841f60b70184661926
test/CodeGenCXX/char8_t.cpp
test/CodeGenCXX/char8_t.cpp
// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s // CHECK: define void @_Z1fDu( void f(char8_t c) {} // CHECK: define void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE template<typename T> void g(decltype(T() + u8"foo" + u8'r')) {} template void g<int>(const char8_t*);
// RUN: %clang_cc1 -std=c++17 -emit-llvm -fchar8_t -triple x86_64-linux %s -o - | FileCheck %s // CHECK: define void @_Z1fDu( void f(char8_t c) {} // CHECK: define weak_odr void @_Z1gIiEvDTplplcvT__ELA4_KDuELDu114EE template<typename T> void g(decltype(T() + u8"foo" + u8'r')) {} template void g<int>(const char8_t*);
Fix up r331244 - the emitted definition is weak_odr linkage. Should get the build bots to healthy again without a full revert. As the functionality added has nothing to do with linkage this seems unlikely to represent a deep or interesting bug in the patch.
Fix up r331244 - the emitted definition is weak_odr linkage. Should get the build bots to healthy again without a full revert. As the functionality added has nothing to do with linkage this seems unlikely to represent a deep or interesting bug in the patch. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@331245 9...
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-cl...
b7788367f57c56f04aceb3ec286478e2e4a7b835
shinobi.cpp
shinobi.cpp
#include <util/maker.hpp> #include <iostream> #include <iomanip> void show_help() noexcept { std::cout << "usage: shinobi [options]\n\n"; std::cout << std::left << '\t' << std::setw(25) << "-h, --help" << "show this message and exit" << '\n'; std::cout << std::left << '\t' << std::setw(25) << "-d, -...
#include <util/maker.hpp> #include <iostream> #include <iomanip> #include <map> void show_help() noexcept { std::cout << "usage: shinobi [options] [--] [filename]\n\n"; std::cout << std::left << '\t' << std::setw(25) << "-h, --help" << "show this message and exit" << '\n'; std::cout << std::left <<...
Add support for custom filenames with the command line
Add support for custom filenames with the command line
C++
mit
Rapptz/Shinobi
115d3ca678d71bde14864224df09c95f7144ba57
src/sdwiki_path_finder.cpp
src/sdwiki_path_finder.cpp
#include <stdio.h> int main(int argc, char* argv[]) { printf("One\n"); printf("Two\n"); printf("Three\n"); printf("Four\n"); return 0; }
#include <stdio.h> #include <iostream> #include <fstream> #include <vector> #include <unordered_map> int main(int argc, char* argv[]) { if (argc != 5) { std::cerr << "Path Finder only accepts 4 arguments\n"; exit(1); } // Load in all page titles into a vector std::cout << "\033[92m==>\033[0m Reading in page ...
Read in the page names into a vector and hash
Read in the page names into a vector and hash
C++
mit
EvanPurkhiser/CS-Six-Degrees-of-Wikipedia,EvanPurkhiser/CS-Six-Degrees-of-Wikipedia
075c1c704f8772cb7bcd51ef4ced9972acb0016a
src/CWizard.cpp
src/CWizard.cpp
#include <memory> #include "Vec2i.h" #include "IMapElement.h" #include "CActor.h" #include "CWizard.h" namespace WizardOfGalicia { CWizard::CWizard() : CActor() { emission = 20; view = '^'; team = Team::HEROES; hp = 5; attack = 4; defence = 1; magicEnergy = 20; } void CWizard::updat...
#include <memory> #include "Vec2i.h" #include "IMapElement.h" #include "CActor.h" #include "CWizard.h" namespace WizardOfGalicia { CWizard::CWizard() : CActor() { emission = 20; view = '^'; team = Team::HEROES; hp = 5; attack = 4; defence = 1; magicEnergy = 20; } void CWizard::updat...
Change the player status based on it's own energy
Change the player status based on it's own energy So it will grow stronger with the more energy it absorbs.
C++
bsd-2-clause
TheFakeMontyOnTheRun/wizardofgalicia,TheFakeMontyOnTheRun/wizardofgalicia
4ae589487233c076abd03a0b1a962d4c2b8af935
courgette/crc.cc
courgette/crc.cc
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "courgette/crc.h" #ifdef OS_CHROMEOS # include "zlib.h" #else extern "C" { # include "third_party/lzma_sdk/7zCrc.h" } #endif #include "ba...
// Copyright (c) 2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Calculate Crc by calling CRC method in LZMA SDK #include "courgette/crc.h" extern "C" { #include "third_party/lzma_sdk/7zCrc.h" } namespace cour...
Revert 112083 - Try a different library for Crc32.
Revert 112083 - Try a different library for Crc32. BUG= TEST= Review URL: http://codereview.chromium.org/8569018 TBR=dgarrett@chromium.org Review URL: http://codereview.chromium.org/8742002 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@112104 0039d316-1c4b-4281-b951-d872f2087c98
C++
bsd-3-clause
ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,an...
1621bff1d97d47fe91419641ff983a6ec3ee5626
App/Console/Source/Main.cpp
App/Console/Source/Main.cpp
#include "KAI/Console/Console.h" #include <iostream> #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <Windows.h> #endif using namespace std; USING_NAMESPACE_KAI //static Color _color; int main(int argc, char **argv) { KAI_UNUSED_2(argc, argv); cout << "pyro v0.1" << endl; Console console; console.SetLang...
#include <KAI/Console/Console.h> #include <iostream> using namespace std; USING_NAMESPACE_KAI int main(int argc, char **argv) { KAI_UNUSED_2(argc, argv); cout << "KAI v0.1" << endl; Console console; console.SetLanguage(Language::Pi); // the higher the number, the greater the verbosity of debug output Proces...
Remove explicit WIN32 references from Console app.
Remove explicit WIN32 references from Console app.
C++
mit
cschladetsch/KAI,cschladetsch/KAI,cschladetsch/KAI
2ec5f551cc455df30183e796a91498c5325b17f2
test/CodeGenCXX/debug-info-pubtypes.cpp
test/CodeGenCXX/debug-info-pubtypes.cpp
// REQUIRES: x86-64-registered-target // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fno-limit-debug-info -S %s -o %t // RUN: FileCheck %s < %t // FIXME: This testcase shouldn't rely on assembly emission. //CHECK: Lpubtypes_begin1: //CHECK: .asciz "G" //CHECK-NEXT: .long 0 //CHECK-NEXT: Lpubtypes...
// REQUIRES: x86-64-registered-target // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fno-limit-debug-info -S %s -o %t // RUN: FileCheck %s < %t // FIXME: This testcase shouldn't rely on assembly emission. //CHECK: Lpubtypes_begin[[SECNUM:[0-9]:]] //CHECK: .asciz "G" //CHECK-NEXT: .long 0 //CHECK-...
Make the test less sensitive to DWARF emission implementation details.
Make the test less sensitive to DWARF emission implementation details. Note: the ":" goes into the regex because FileCheck wrongly complains about unbalanced brackets otherwise. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@168934 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
cd88623cbe387ac91a2882d1abe10abb83708eb2
Server.cpp
Server.cpp
/* * Copyright (C) 2004-2009 See the AUTHORS file for details. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. */ #include "Server.h" CServer::CServer(const CString& sName, ...
/* * Copyright (C) 2004-2009 See the AUTHORS file for details. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. */ #include "Server.h" CServer::CServer(const CString& sName, ...
Use find() instead of walking strings 'by hand' in IsValidHostName
Use find() instead of walking strings 'by hand' in IsValidHostName git-svn-id: 3ad904ec35b89a071badd9cb0113dfe58093e920@1363 726aef4b-f618-498e-8847-2d620e286838
C++
apache-2.0
withinsoft/znc,trisk/znc,Mikaela/znc,jantman/znc,trisk/znc,withinsoft/znc,reedloden/znc,TingPing/znc,elyscape/znc,jreese/znc,Phansa/znc,Hasimir/znc,jpnurmi/znc,jantman/znc,Mkaysi/znc,aarondunlap/znc,GLolol/znc,kashike/znc,badloop/znc,znc/znc,Mikaela/znc,jantman/znc,Adam-/znc,TingPing/znc,BtbN/znc,Kriechi/nobnc,BtbN/znc...
d6b787a05e4790d97d0937e30d5279bb4624eb1f
example/fltk/draw_x.cpp
example/fltk/draw_x.cpp
// Copyright (c) 2016, Herman Bergwerf. All rights reserved. // Use of this source code is governed by a MIT-style license // that can be found in the LICENSE file. // Based on: http://seriss.com/people/erco/fltk/#FltkX #include <FL/Fl.H> #include <FL/fl_draw.H> #include <FL/Fl_Box.H> #include <FL/Fl_Double_Window.H>...
// Copyright (c) 2016, Herman Bergwerf. All rights reserved. // Use of this source code is governed by a MIT-style license // that can be found in the LICENSE file. // Based on: http://seriss.com/people/erco/fltk/#FltkX #include <FL/Fl.H> #include <FL/fl_draw.H> #include <FL/Fl_Box.H> #include <FL/Fl_Double_Window.H>...
Fix the draw X FLTK C++ example
Fix the draw X FLTK C++ example
C++
mit
hermanbergwerf/fltk-dart,hermanbergwerf/fltk-dart,hermanbergwerf/fltk-dart,hermanbergwerf/fltk-dart
018cb5f7bb7f854a4d0f45f94df7b18ae1b843af
test/functionalities/attach_resume/main.cpp
test/functionalities/attach_resume/main.cpp
#include <stdio.h> #include <fcntl.h> #include <chrono> #include <thread> void *start(void *data) { int i; size_t idx = (size_t)data; for (i=0; i<30; i++) { if ( idx == 0 ) std::this_thread::sleep_for(std::chrono::microseconds(1)); std::this_thread::sleep_for(std::chrono::s...
#include <stdio.h> #include <fcntl.h> #include <chrono> #include <thread> #if defined(__linux__) #include <sys/prctl.h> #endif void *start(void *data) { int i; size_t idx = (size_t)data; for (i=0; i<30; i++) { if ( idx == 0 ) std::this_thread::sleep_for(std::chrono::microseconds(1...
Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown.
Fix TestAttachResume test so it doesn't hang on Linux with ptrace lockdown. Similar to previous fix, this augments the test inferior to immediately indicate it may be ptraced by any Linux process when the appropriate symbols are defined. This seems to indicate we need to fix our lldb attach logic to catch when an att...
C++
apache-2.0
apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb
a42fc98e14d57b919ce192a2d442399520b06eec
config/config_type_int.cc
config/config_type_int.cc
#include <inttypes.h> #include <stdlib.h> #include <config/config_type_int.h> ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t imax; imax = strtoimax(str,...
#if !defined(__OPENNT) #include <inttypes.h> #endif #include <stdlib.h> #include <config/config_type_int.h> ConfigTypeInt config_type_int; bool ConfigTypeInt::set(ConfigValue *cv, const std::string& vstr) { if (ints_.find(cv) != ints_.end()) return (false); const char *str = vstr.c_str(); char *endp; intmax_t...
Use strtoll like strtoimax on Interix.
Use strtoll like strtoimax on Interix.
C++
bsd-2-clause
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
23440c642a533b291000383ad218734648073f97
libevm/VMFace.cpp
libevm/VMFace.cpp
/* This file is part of cpp-ethereum. cpp-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. cpp-ethereum is distributed in the...
/* This file is part of cpp-ethereum. cpp-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. cpp-ethereum is distributed in the...
Return jit::VM only if ETH_JIT macro is on
Return jit::VM only if ETH_JIT macro is on
C++
mit
PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,expanse-org/cpp-expanse,smartbitcoin/cpp-ethereum,gluk256/cpp-ethereum,gluk256/cpp-ethereum,expanse-project/cpp-expanse,LefterisJP/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,smartbitcoin/cpp-ethereum,kare...
8d9633466d9d28f425d23d73c8687cb355bd8624
demos/smoke/Game.cpp
demos/smoke/Game.cpp
/* * Copyright (C) 2016 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
/* * Copyright (C) 2016 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
Fix compiler warning in smoketest
demos: Fix compiler warning in smoketest Replaced snprintf with stringstream.
C++
apache-2.0
KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers
45928f29a5996def30f1e6c0ceb78a05b37c6d0d
src/clang-cache.cpp
src/clang-cache.cpp
#include "daemon.h" #include <err.h> #include <iostream> #include <string.h> #include <unistd.h> int main(int argc, char **argv) { int separator = 0; char** compile_argv; for (int i = 1; i < argc; ++i) { if (strcmp(argv[i], "--") == 0) { separator = i; break; } } compile_argv = argv + ...
#include "daemon.h" #include <cstring> #include <err.h> #include <iostream> #include <unistd.h> int main(int argc, char **argv) { int separator = 0; char** compile_argv; for (int i = 1; i < argc; ++i) { if (std::strcmp(argv[i], "--") == 0) { separator = i; break; } } compile_argv = arg...
Use C++ includes when appropriate.
Use C++ includes when appropriate.
C++
bsd-3-clause
sas/clang-cache,sas/clang-cache
95f217e1cf0f493a0e3b48c4384e6f4a477174f7
src/broken_link_finder.cc
src/broken_link_finder.cc
#include <cstdio> #include <string> #include <vector> using std::vector; using std::string; int main(int argc, char *argv[]) { vector<string> args(argv + 1, argv + argc); for (const auto &arg : args) { printf("%s\n", arg.c_str()); } return 0; }
#include <cstdio> #include <string> #include <vector> #include <curl/curl.h> using std::vector; using std::string; struct LinkTestData { string in_source_url; string in_href_url; string out_source_page; }; size_t WriteData(void *buffer, size_t size, size_t nmemb, void *userp) { LinkTestData *link_test_data...
Make script download and print a web page.
broken_link_checker: Make script download and print a web page.
C++
apache-2.0
evankroske/broken_link_reporter
c25378c792497019501e65437bf3026f6799357f
thpp/Storage.cpp
thpp/Storage.cpp
/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include <t...
/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #include <t...
Fix incorrect use of IOBuf::reserve
Fix incorrect use of IOBuf::reserve Differential Revision: D2037078 fb-gh-sync-id: d8bc304506ea70bfde3a3490f1aac23bc4392efa shipit-source-id: d8bc304506ea70bfde3a3490f1aac23bc4392efa
C++
bsd-3-clause
apaszke/thpp,apaszke/thpp
3171df63f70062187200d63fad684689b25231c2
sim/readfile.cpp
sim/readfile.cpp
#include "readfile.h" #include <stdexcept> #include <sstream> #include <cstdio> #include <cerrno> #include <cstring> using namespace std; /* read_file: read the entire contents of a file into a C++ string. */ string read_file(const string& filename) { // Open the file int errno_; FILE* fd; if (NULL =...
#include "readfile.h" #include <stdexcept> #include <sstream> #include <cstdio> #include <cerrno> #include <cstring> using namespace std; /* read_file: read the entire contents of a file into a C++ string. */ string read_file(const string& filename) { // Open the file int errno_; FILE* fd; if (filena...
Enable reading from stdin if the configuration filename is '-'.
Enable reading from stdin if the configuration filename is '-'.
C++
mit
Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim
06c8ed56b4cf0815434f036bbd1dda7fc234af62
src/keyboard.cpp
src/keyboard.cpp
#include <core.h> #include "thermostat.h" #include "keyboard.h" #define BUTTONS 4 uint8_t keyPins[BUTTONS] = {KEY_MODE_PIN, KEY_UP_PIN, KEY_DOWN_PIN, KEY_SETUP_PIN}; uint32_t lastKeyChangeMillis[BUTTONS] = {0, 0, 0, 0}; using namespace core; idType keyIds[BUTTONS]; idType idKeyMode, idKeyUp, idKeyDown, idKeySetup; v...
#include <core.h> #include "thermostat.h" #include "keyboard.h" #define BUTTONS 4 uint8_t keyPins[BUTTONS] = {KEY_MODE_PIN, KEY_UP_PIN, KEY_DOWN_PIN, KEY_SETUP_PIN}; uint32_t lastKeyChangeMillis[BUTTONS] = {0, 0, 0, 0}; using namespace core; idType keyIds[BUTTONS]; idType idKeyMode, idKeyUp, idKeyDown, idKeySetup; v...
Fix wrong assigned key digital ids
Fix wrong assigned key digital ids
C++
apache-2.0
redforks/thermostat,redforks/thermostat
a57e4bf8e8df46bbf9b8c91b2cadadb1dc4ef072
test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
test/std/input.output/iostreams.base/ios.base/ios.types/ios_Init/ios_Init.multiple.pass.cpp
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
Mark iostreams test as XFAIL on older macOSes
[libc++] Mark iostreams test as XFAIL on older macOSes git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@372620 91177308-0d34-0410-b5e6-96231b3b80d8
C++
apache-2.0
llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx,llvm-mirror/libcxx
54419bbbb1a46a0aaa8dc71c9ac85da4f0896637
brightray/common/application_info_win.cc
brightray/common/application_info_win.cc
#include "common/application_info.h" namespace brightray { std::string GetApplicationName() { return std::string(); } std::string GetApplicationVersion() { return std::string(); } }
#include "common/application_info.h" #include "base/file_version_info.h" #include "base/memory/scoped_ptr.h" #include "base/utf_string_conversions.h" namespace brightray { std::string GetApplicationName() { auto info = make_scoped_ptr(FileVersionInfo::CreateFileVersionInfoForModule(GetModuleHandle(nullptr))); re...
Set the user agent string correctly on Windows
Set the user agent string correctly on Windows We use the main executable's ProductName and FileVersion resources to build the user agent string.
C++
mit
renaesop/electron,electron/electron,the-ress/electron,biblerule/UMCTelnetHub,rajatsingla28/electron,thomsonreuters/electron,the-ress/electron,electron/electron,Floato/electron,renaesop/electron,seanchas116/electron,thomsonreuters/electron,seanchas116/electron,Floato/electron,Floato/electron,gerhardberger/electron,gerha...
c2d41f161da318405292715c8dc1936efede8f0a
src/protocol/protocol.cpp
src/protocol/protocol.cpp
/* This file is part of fus. * * fus is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * fus is distributed i...
/* This file is part of fus. * * fus is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * fus is distributed i...
Fix auth struct linker problem
Fix auth struct linker problem
C++
agpl-3.0
Hoikas/fus
f69a95fa1f1820d5e6609430375c67cdc0d9c742
src/rdb_protocol/configured_limits.cc
src/rdb_protocol/configured_limits.cc
#include "rdb_protocol/configured_limits.hpp" #include <limits> #include "rdb_protocol/wire_func.hpp" #include "rdb_protocol/func.hpp" namespace ql { configured_limits_t from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments) { if (arguments->has_optarg("array_limit")) { // Fak...
#include "rdb_protocol/configured_limits.hpp" #include <limits> #include "rdb_protocol/wire_func.hpp" #include "rdb_protocol/func.hpp" namespace ql { configured_limits_t from_optargs(rdb_context_t *ctx, signal_t *interruptor, global_optargs_t *arguments) { if (arguments->has_optarg("array_limit")) { // Fak...
Use PRIi64 macro to work around clang weirdness.
Use PRIi64 macro to work around clang weirdness.
C++
apache-2.0
gdi2290/rethinkdb,captainpete/rethinkdb,ajose01/rethinkdb,lenstr/rethinkdb,yakovenkodenis/rethinkdb,wkennington/rethinkdb,grandquista/rethinkdb,mcanthony/rethinkdb,bpradipt/rethinkdb,eliangidoni/rethinkdb,scripni/rethinkdb,jmptrader/rethinkdb,wkennington/rethinkdb,matthaywardwebdesign/rethinkdb,urandu/rethinkdb,victorb...
05dfd60217ac7ee0143bb080f02605ef167018ea
SSPSolution/SSPSolution/LevelState.cpp
SSPSolution/SSPSolution/LevelState.cpp
#include "LevelState.h" LevelState::LevelState() { } LevelState::~LevelState() { } int LevelState::ShutDown() { int result = 1; return result; } int LevelState::Initialize(GameStateHandler * gsh, ComponentHandler* cHandler) { int result = 0; result = GameState::InitializeBase(gsh, cHandler); //Read from fi...
#include "LevelState.h" LevelState::LevelState() { } LevelState::~LevelState() { } int LevelState::ShutDown() { int result = 1; return result; } int LevelState::Initialize(GameStateHandler * gsh, ComponentHandler* cHandler) { int result = 0; result = GameState::InitializeBase(gsh, cHandler); //Read from fi...
ADD gets graphicscomponent and sets values
ADD gets graphicscomponent and sets values
C++
apache-2.0
Chringo/SSP,Chringo/SSP
3b8ec03fbc2d385d9f1d11b362d6ca1f0281ad9f
App/Factories/TextFileNFDelegate.cpp
App/Factories/TextFileNFDelegate.cpp
// Includes #include "App/Factories/TextFileNFDelegate.h" #include "App/Nodes/TextFileNode.h" #include "App/Logger.h" // STD. #include <fstream> TextFileNFDelegate::TextFileNFDelegate() { } TextFileNFDelegate::~TextFileNFDelegate() { } std::string TextFileNFDelegate::nodeType() const { return "TextFile"; } s...
// Includes #include "App/Factories/TextFileNFDelegate.h" #include "App/Nodes/TextFileNode.h" #include "App/Logger.h" // STD. #include <fstream> TextFileNFDelegate::TextFileNFDelegate() { } TextFileNFDelegate::~TextFileNFDelegate() { } std::string TextFileNFDelegate::nodeType() const { return "TextFile"; } s...
Add check for “txt” extension.
Add check for “txt” extension.
C++
mit
jefaramvangorp/nodin
b76708e0c109bebdb133a31bea06f4bed9c462f0
opencog/guile/SchemeAdHoc.cc
opencog/guile/SchemeAdHoc.cc
/* * SchemeAdHoc.c * * Scheme adhoc callback into opencog * * Copyright (c) 2008 Linas Vepstas <linas@linas.org> */ #ifdef HAVE_GUILE #include <libguile.h> #include <opencog/server/CogServer.h> #include <opencog/nlp/wsd/WordSenseProcessor.h> #include "SchemeSmob.h" using namespace opencog; /* ==============...
/* * SchemeAdHoc.c * * Scheme adhoc callback into opencog * * Copyright (c) 2008 Linas Vepstas <linas@linas.org> */ #ifdef HAVE_GUILE #include <libguile.h> #include <opencog/server/CogServer.h> #include <opencog/nlp/wsd/WordSenseProcessor.h> #include "SchemeSmob.h" using namespace opencog; /* ==============...
Fix passing of server to subsystem.
Fix passing of server to subsystem. modified: opencog/guile/SchemeAdHoc.cc
C++
agpl-3.0
prateeksaxena2809/opencog,rohit12/opencog,prateeksaxena2809/opencog,Selameab/opencog,anitzkin/opencog,Allend575/opencog,virneo/opencog,misgeatgit/atomspace,kinoc/opencog,zhaozengguang/opencog,inflector/atomspace,sanuj/opencog,anitzkin/opencog,gavrieltal/opencog,virneo/atomspace,yantrabuddhi/atomspace,rodsol/opencog,Arv...
6fe5b043aba3d7d98bc79b916a50cfe296036a14
src/main.cc
src/main.cc
#include <iostream> #include "cons.h" #include "error.h" #include "eval.h" #include "init.h" #include "reader.h" namespace { class Repl { std::istream& in_; std::ostream& out_; std::string prompt_ = "mclisp> "; mclisp::Reader reader_; public: explicit Repl(std::istream& in=std::cin, std::ostream& out=...
#include <iostream> #include "cons.h" #include "error.h" #include "eval.h" #include "init.h" #include "reader.h" namespace { bool ShouldQuit(mclisp::ConsCell *exp) { std::ostringstream oss; oss << *exp; return EQ(exp, EOF) || oss.str() == "QUIT" || oss.str() == "(QUIT)"; } class Repl { std::istream& in_; ...
Call ShouldQuit function to determine when to exit the REPL.
Call ShouldQuit function to determine when to exit the REPL.
C++
mit
appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp
6437e714fa21a55da7fcb709e15f229a322d7170
source/RefCounted.cpp
source/RefCounted.cpp
#include "mbed.h" #include "MicroBit.h" void RefCounted::init() { // Initialize to one reference (lowest bit set to 1) refCount = 3; } static inline bool isReadOnlyInline(RefCounted *t) { uint32_t refCount = t->refCount; if (refCount == 0xffff) return true; // object in flash // Do some ...
#include "mbed.h" #include "MicroBit.h" void RefCounted::init() { // Initialize to one reference (lowest bit set to 1) refCount = 3; } static inline bool isReadOnlyInline(RefCounted *t) { uint32_t refCount = t->refCount; if (refCount == 0xffff) return true; // object in flash // Do some ...
Delete when ref-count goes to 1, not 2\!
Delete when ref-count goes to 1, not 2\!
C++
mit
markshannon/microbit-dal,markshannon/microbit-dal
c78324cfa3e56639499eb938e85563b75be25e18
src/main.cc
src/main.cc
#include <SFML/Graphics.hpp> int main(int argc, char const *argv[]) { sf::RenderWindow window(sf::VideoMode(800, 600), "Lord of the Orb", sf::Style::Titlebar | sf::Style::Close); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.type =...
#include <SFML/Graphics.hpp> int main(int argc, char const *argv[]) { sf::RenderWindow window(sf::VideoMode(1280, 720), "Lord of the Orb", sf::Style::Close); while (window.isOpen()) { sf::Event event; while (window.pollEvent(event)) { if (event.t...
Change resolution to 16:9 aspect ratio
Change resolution to 16:9 aspect ratio
C++
mit
davidgasquez/loto,davidgasquez/loto
78e6ce273e56b2e2312654f4749c8999025c30cc
src/main.cc
src/main.cc
#include <node.h> #include <node_internals.h> using namespace v8; #include "runas.h" namespace { Handle<Value> Runas(const Arguments& args) { HandleScope scope; if (!args[0]->IsString() || !args[1]->IsArray() || !args[2]->IsObject()) return node::ThrowError("Bad argument"); std::string command(*String::U...
#include "nan.h" using namespace v8; #include "runas.h" namespace { NAN_METHOD(Runas) { NanScope(); if (!args[0]->IsString() || !args[1]->IsArray() || !args[2]->IsObject()) return NanThrowTypeError("Bad argument"); std::string command(*String::Utf8Value(args[0])); std::vector<std::string> c_args; Ha...
Use nan to wrap V8 functions.
Use nan to wrap V8 functions.
C++
mit
atom/node-runas,dustinblackman/node-runas,paulcbetts/node-runas,dbkaplun/node-runas,dustinblackman/node-runas,dbkaplun/node-runas,pombredanne/node-runas,pombredanne/node-runas,atom/node-runas,paulcbetts/node-runas