From 64055186bb14b696d6713020c41d2f313a184599 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Thu, 6 Jan 2005 06:24:35 +0000 Subject: [PATCH] formatting --- direct/src/showutil/Effects.py | 11 ++--------- panda/src/pgraph/loader.cxx | 18 ++++++++---------- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/direct/src/showutil/Effects.py b/direct/src/showutil/Effects.py index fdefc255e8..32c748b761 100644 --- a/direct/src/showutil/Effects.py +++ b/direct/src/showutil/Effects.py @@ -53,18 +53,11 @@ def createRBounce(nodeObj, numBounces, startValues, totalTime, amplitude): return createBounce(nodeObj, numBounces, startValues, totalTime, amplitude, R_BOUNCE) - -# createBounce: create and return a list of intervals to make a -# given nodePath bounce a given number of times over a give total time. -# def createBounce(nodeObj, numBounces, startValues, totalTime, amplitude, bounceType=SZ_BOUNCE): """ - //////////////////////////////////////////////////////////////////// - // Function: createBounce - // Parameters: - // Changes: - //////////////////////////////////////////////////////////////////// + createBounce: create and return a list of intervals to make a + given nodePath bounce a given number of times over a give total time. """ if not nodeObj or numBounces < 1 or totalTime == 0: self.notify.warning( diff --git a/panda/src/pgraph/loader.cxx b/panda/src/pgraph/loader.cxx index 507054d4ba..c3cda74323 100644 --- a/panda/src/pgraph/loader.cxx +++ b/panda/src/pgraph/loader.cxx @@ -124,12 +124,11 @@ find_all_files(const Filename &filename, const DSearchPath &search_path, num_added = search_path.find_all_files(filename, files); } - for (int i = 0; i < num_added; i++) { + for (int i = 0; i < num_added; ++i) { results.add_file(files.get_file(i), requested_type); } } } - } else { // If the extension *is* empty, we have to search for all possible // file types. @@ -138,7 +137,7 @@ find_all_files(const Filename &filename, const DSearchPath &search_path, if (!filename.is_local()) { // Global filename, take it as it is. - for (int t = 0; t < num_types; t++) { + for (int t = 0; t < num_types; ++t) { LoaderFileType *type = reg->get_type(t); Filename file(filename); file.set_extension(type->get_extension()); @@ -147,23 +146,22 @@ find_all_files(const Filename &filename, const DSearchPath &search_path, VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); if (vfs->exists(file)) { results.add_file(file, type); - num_added++; + ++num_added; } } else { if (file.exists()) { results.add_file(file, type); - num_added++; + ++num_added; } } } - } else { // Local filename, look it up on the model path. int num_dirs = search_path.get_num_directories(); - for (int i = 0; i < num_dirs; i++) { + for (int i = 0; i < num_dirs; ++i) { const Filename &directory = search_path.get_directory(i); - for (int t = 0; t < num_types; t++) { + for (int t = 0; t < num_types; ++t) { LoaderFileType *type = reg->get_type(t); Filename file(directory, filename); file.set_extension(type->get_extension()); @@ -172,12 +170,12 @@ find_all_files(const Filename &filename, const DSearchPath &search_path, VirtualFileSystem *vfs = VirtualFileSystem::get_global_ptr(); if (vfs->exists(file)) { results.add_file(file, type); - num_added++; + ++num_added; } } else { if (file.exists()) { results.add_file(file, type); - num_added++; + ++num_added; } } }